This documentation is archived and is not being maintained.

XPathNavigator.GetNamespacesInScope Method

Note: This method is new in the .NET Framework version 2.0.

Returns the in-scope namespaces of the current node.

Namespace: System.Xml.XPath
Assembly: System.Xml (in system.xml.dll)

public virtual IDictionary<string,string> GetNamespacesInScope (
	XmlNamespaceScope scope
)
public IDictionary<String,String> GetNamespacesInScope (
	XmlNamespaceScope scope
)
public function GetNamespacesInScope (
	scope : XmlNamespaceScope
) : IDictionary<String,String>

Parameters

scope

An XmlNamespaceScope value specifying the namespaces to return.

Return Value

An IDictionary collection of namespace names keyed by prefix.

The namespaces returned depends on the XmlNamespaceScope value specified.

XmlNamespaceScope Value

Namespaces Returned

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.

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.

Local

All namespaces that are defined locally at the current node.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: