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

◆ GetNamespacesInScope()

virtual IDictionary< string, string > System.Xml.XPath.XPathNavigator.GetNamespacesInScope ( XmlNamespaceScope scope)
inlinevirtualinherited

Implements System.Xml.IXmlNamespaceResolver.

Definition at line 790 of file XPathNavigator.cs.

791 {
792 XPathNodeType nodeType = NodeType;
793 if ((nodeType != XPathNodeType.Element && scope != XmlNamespaceScope.Local) || nodeType == XPathNodeType.Attribute || nodeType == XPathNodeType.Namespace)
794 {
795 XPathNavigator xPathNavigator = Clone();
796 if (xPathNavigator.MoveToParent())
797 {
798 return xPathNavigator.GetNamespacesInScope(scope);
799 }
800 }
802 if (scope == XmlNamespaceScope.All)
803 {
804 dictionary["xml"] = "http://www.w3.org/XML/1998/namespace";
805 }
807 {
808 do
809 {
810 string localName = LocalName;
811 string value = Value;
812 if (localName.Length != 0 || value.Length != 0 || scope == XmlNamespaceScope.Local)
813 {
814 dictionary[localName] = value;
815 }
816 }
818 MoveToParent();
819 }
820 return dictionary;
821 }

References System.Xml.XPath.XPathNavigator.Clone(), System.dictionary, System.Xml.XPath.XPathNavigator.LocalName, System.Xml.XPath.XPathNavigator.MoveToFirstNamespace(), System.Xml.XPath.XPathNavigator.MoveToNextNamespace(), System.Xml.XPath.XPathNavigator.MoveToParent(), System.Xml.XPath.XPathNavigator.NodeType, System.value, and System.Xml.XPath.XPathItem.Value.

Referenced by System.Xml.XPath.XPathNavigatorReader.GetNamespacesInScope().