Редагувати

Поділитися через


XmlNamespaceManager.GetNamespacesInScope(XmlNamespaceScope) Method

Definition

Gets a collection of namespace names keyed by prefix which can be used to enumerate the namespaces currently in scope.

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 enumeration value that specifies the type of namespace nodes to return.

Returns

A collection of namespace and prefix pairs currently in scope.

Implements

Remarks

The dictionary consists of a collection of namespace names keyed by prefix. It can be used to enumerate the in-scope namespaces. The dictionary is a disconnected copy of the namespace list. It remains unchanged as the current in-scope namespace list changes.

The following table shows how XmlNamespaceScope values affect the namespaces returned by the GetNamespacesInScope method.

XmlNamespaceScope value xmlns:xml xmlns:xmlns xmlns=""
All Yes No No
ExcludeXml No No No
Local No No Yes

Applies to

See also