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

◆ CreateNavigator() [2/2]

override? XPathNavigator System.Xml.XmlDataDocument.CreateNavigator ( XmlNode node)
inlineprotectedvirtual

Reimplemented from System.Xml.XmlDocument.

Definition at line 2342 of file XmlDataDocument.cs.

2343 {
2344 if (XPathNodePointer.s_xmlNodeType_To_XpathNodeType_Map[(int)node.NodeType] == -1)
2345 {
2346 return null;
2347 }
2348 if (IsTextNode(node.NodeType))
2349 {
2350 XmlNode xmlNode = node.ParentNode;
2351 if (xmlNode != null && xmlNode.NodeType == XmlNodeType.Attribute)
2352 {
2353 return null;
2354 }
2355 XmlNode xmlNode2 = node.PreviousSibling;
2356 while (xmlNode2 != null && IsTextNode(xmlNode2.NodeType))
2357 {
2358 node = xmlNode2;
2360 }
2361 }
2362 return new DataDocumentXPathNavigator(this, node);
2363 }
XmlNode SafePreviousSibling(XmlNode n)
static bool IsTextNode(XmlNodeType nt)

References System.Xml.Dictionary, System.Xml.XmlDataDocument.IsTextNode(), System.Xml.XPathNodePointer.s_xmlNodeType_To_XpathNodeType_Map, and System.Xml.XmlDataDocument.SafePreviousSibling().