XmlNamespaceManager.GetNamespacesInScope(XmlNamespaceScope) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |