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

◆ IsValidChild()

static bool System.Xml.DocumentXPathNavigator.IsValidChild ( XmlNode parent,
XmlNode child )
inlinestaticprivate

Definition at line 1894 of file DocumentXPathNavigator.cs.

1895 {
1896 switch (parent.NodeType)
1897 {
1898 case XmlNodeType.Element:
1899 return true;
1900 case XmlNodeType.DocumentFragment:
1901 switch (child.NodeType)
1902 {
1903 case XmlNodeType.Element:
1904 case XmlNodeType.Text:
1905 case XmlNodeType.CDATA:
1906 case XmlNodeType.ProcessingInstruction:
1907 case XmlNodeType.Comment:
1908 case XmlNodeType.Whitespace:
1909 case XmlNodeType.SignificantWhitespace:
1910 return true;
1911 }
1912 break;
1913 case XmlNodeType.Document:
1914 {
1915 XmlNodeType nodeType = child.NodeType;
1916 if (nodeType == XmlNodeType.Element || (uint)(nodeType - 7) <= 1u)
1917 {
1918 return true;
1919 }
1920 break;
1921 }
1922 }
1923 return false;
1924 }

References System.Xml.XmlNode.NodeType.

Referenced by System.Xml.DocumentXPathNavigator.MoveToFirst(), System.Xml.DocumentXPathNavigator.MoveToFirstChild(), System.Xml.DocumentXPathNavigator.MoveToNext(), and System.Xml.DocumentXPathNavigator.MoveToPrevious().