Click or drag to resize

ConfigAccessorGetNodeByPath Method (ConfigNode, String, Boolean)

Reads a node from config node by a path.

Namespace:  KSPDev.ConfigUtils
Assembly:  KSPDev_Utils.1.1 (in KSPDev_Utils.1.1.dll) Version: 1.1 for KSP v1.6+
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: SystemString
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: SystemBoolean
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