Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetRoot()

static XmlNode System.Xml.XPathNodePointer.GetRoot ( XmlNode node,
ref int depth )
inlinestaticprivate

Definition at line 1006 of file XPathNodePointer.cs.

1007 {
1008 depth = 0;
1009 XmlNode xmlNode = node;
1010 XmlNode xmlNode2 = ((xmlNode.NodeType == XmlNodeType.Attribute) ? ((XmlAttribute)xmlNode).OwnerElement : xmlNode.ParentNode);
1011 while (xmlNode2 != null)
1012 {
1013 xmlNode = xmlNode2;
1014 xmlNode2 = xmlNode.ParentNode;
1015 depth++;
1016 }
1017 return xmlNode;
1018 }

References System.Xml.XmlNode.ParentNode.