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

◆ LookupNamespace()

virtual ? string System.Xml.XPath.XPathNavigator.LookupNamespace ( string prefix)
inlinevirtualinherited

Implements System.Xml.IXmlNamespaceResolver.

Reimplemented in System.Xml.DocumentXPathNavigator.

Definition at line 715 of file XPathNavigator.cs.

716 {
717 if (prefix == null)
718 {
719 return null;
720 }
721 if (NodeType != XPathNodeType.Element)
722 {
723 XPathNavigator xPathNavigator = Clone();
724 if (xPathNavigator.MoveToParent())
725 {
726 return xPathNavigator.LookupNamespace(prefix);
727 }
728 }
729 else if (MoveToNamespace(prefix))
730 {
731 string value = Value;
732 MoveToParent();
733 return value;
734 }
735 if (prefix.Length == 0)
736 {
737 return string.Empty;
738 }
739 if (prefix == "xml")
740 {
741 return "http://www.w3.org/XML/1998/namespace";
742 }
743 if (prefix == "xmlns")
744 {
745 return "http://www.w3.org/2000/xmlns/";
746 }
747 return null;
748 }
virtual bool MoveToNamespace(string name)

References System.Xml.XPath.XPathNavigator.Clone(), System.Xml.XPath.XPathNavigator.MoveToNamespace(), System.Xml.XPath.XPathNavigator.MoveToParent(), System.Xml.XPath.XPathNavigator.NodeType, System.prefix, System.value, and System.Xml.XPath.XPathItem.Value.

Referenced by System.Xml.XPath.XPathNavigatorReader.LookupNamespace(), System.Xml.XPath.XPathNavigator.LookupPrefix(), and System.Xml.Xsl.Runtime.XsltFunctions.MSNamespaceUri().