Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

XmlNamespaceManager::GetNamespacesInScope Method (XmlNamespaceScope)

 

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

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

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

Parameters

scope
Type: System.Xml::XmlNamespaceScope

An enumeration value that specifies the type of namespace nodes to return.

Return Value

Type: System.Collections.Generic::IDictionary<String^, String^>^

A collection of namespace and prefix pairs currently in scope.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 2.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2017 Microsoft