System.Xml.XPath.XPathNavigator.GetNamespacesInScope Method

Returns the in-scope namespaces of the current node.

Syntax

public virtual IDictionary<string, string> GetNamespacesInScope (System.Xml.XmlNamespaceScope scope)

Parameters

scope
An System.Xml.XmlNamespaceScope value specifying the namespaces to return.

Returns

An IDictionary`2 collection of namespace names keyed by prefix.

Remarks

The namespaces returned depends on the System.Xml.XmlNamespaceScope value specified.

System.Xml.XmlNamespaceScope.All

All namespaces defined in the scope of the current node. This includes the xmlns:xml namespace, which is always declared implicitly. The order of the namespaces returned is not defined.

System.Xml.XmlNamespaceScope.ExcludeXml

All namespaces defined in the scope of the current node, excluding the xmlns:xml namespace, which is always declared implicitly. The order of the namespaces returned is not defined.

System.Xml.XmlNamespaceScope.Local

All namespaces that are defined locally at the current node.

Requirements

Namespace: System.Xml.XPath
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0