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

◆ CreateContextReader()

XmlReader System.Xml.XPath.XPathNavigator.CreateContextReader ( string xml,
bool fromCurrentNode )
inlineprivateinherited

Definition at line 1873 of file XPathNavigator.cs.

1874 {
1875 if (xml == null)
1876 {
1877 throw new ArgumentNullException("xml");
1878 }
1879 XPathNavigator xPathNavigator = CreateNavigator();
1880 XmlNamespaceManager xmlNamespaceManager = new XmlNamespaceManager(NameTable);
1881 if (!fromCurrentNode)
1882 {
1883 xPathNavigator.MoveToParent();
1884 }
1885 if (xPathNavigator.MoveToFirstNamespace(XPathNamespaceScope.All))
1886 {
1887 do
1888 {
1889 xmlNamespaceManager.AddNamespace(xPathNavigator.LocalName, xPathNavigator.Value);
1890 }
1891 while (xPathNavigator.MoveToNextNamespace(XPathNamespaceScope.All));
1892 }
1893 XmlParserContext context = new XmlParserContext(NameTable, xmlNamespaceManager, null, XmlSpace.Default);
1894 XmlTextReader xmlTextReader = new XmlTextReader(xml, XmlNodeType.Element, context);
1895 xmlTextReader.WhitespaceHandling = WhitespaceHandling.Significant;
1896 return xmlTextReader;
1897 }
virtual XPathNavigator CreateNavigator()

References System.Xml.XPath.XPathNavigator.CreateNavigator(), and System.Xml.Dictionary.

Referenced by System.Xml.XPath.XPathNavigator.AppendChild(), System.Xml.XPath.XPathNavigator.InsertAfter(), System.Xml.XPath.XPathNavigator.InsertBefore(), System.Xml.XPath.XPathNavigator.PrependChild(), and System.Xml.XPath.XPathNavigator.ReplaceSelf().