Click or drag to resize

ConfigAccessor.GetNodeByPath Method (ConfigNode,String[], Boolean)

Reads a node from config node by a path.

Namespace:  KSPDev.ConfigUtils
Assembly:  KSPDev_Utils.2.6 (in KSPDev_Utils.2.6.dll) Version: 2.6 for KSP v1
Syntax
C#
public static ConfigNode GetNodeByPath(
	ConfigNode node,
	string[] pathKeys,
	bool createIfMissing = false
)
Request Example View Source

Parameters

node
Type: (Default Namespace).ConfigNode
A node to read data from.
pathKeys
Type:System.String[]
An array of values that makes the full path. First node in the array is the top most component of the path.
createIfMissing (Optional)
Type: System.Boolean
If true than unknown nodes in the path will be created.

Return Value

Type: ConfigNode
Config node or null if path or node is not present in the node. Returns node if path is empty array.
See Also