/// <summary> /// Get a property node. /// </summary> /// <param name="path">The path of the node, relative to root.</param> /// <param name="create">true to create the node if it doesn't exist.</param> /// <returns>The node, or null if none exists and none was created.</returns> public PropertyNode GetNode(string path, bool create = false) { List <PathComponent> components = new List <PathComponent>(); PathComponentUtis.ParsePath(path, components); return(FindNode(this, components, 0, create)); }
/// <summary> /// Get a property node. /// </summary> /// <param name="relpath">The path of the node, relative to root.</param> /// <param name="create">true to create the node if it doesn't exist.</param> /// <returns>The node, or null if none exists and none was created.</returns> public PropertyNode GetNode(string relpath, int index, bool create = false) { List <PathComponent> components = new List <PathComponent>(); PathComponentUtis.ParsePath(relpath, components); if (components.Count > 0) { components[components.Count - 1].index = index; } return(FindNode(this, components, 0, create)); }