Modifica

Condividi tramite


XPathNavigator.GetNamespacesInScope(XmlNamespaceScope) Method

Definition

Returns the in-scope namespaces of the current node.

public:
 virtual System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ GetNamespacesInScope(System::Xml::XmlNamespaceScope scope);
public virtual System.Collections.Generic.IDictionary<string,string> GetNamespacesInScope (System.Xml.XmlNamespaceScope scope);
abstract member GetNamespacesInScope : System.Xml.XmlNamespaceScope -> System.Collections.Generic.IDictionary<string, string>
override this.GetNamespacesInScope : System.Xml.XmlNamespaceScope -> System.Collections.Generic.IDictionary<string, string>
Public Overridable Function GetNamespacesInScope (scope As XmlNamespaceScope) As IDictionary(Of String, String)

Parameters

scope
XmlNamespaceScope

An XmlNamespaceScope value specifying the namespaces to return.

Returns

An IDictionary<TKey,TValue> collection of namespace names keyed by prefix.

Implements

Remarks

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.

Applies to