Udostępnij za pośrednictwem


XmlNamespaceManager.GetNamespacesInScope Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Overridable Function GetNamespacesInScope ( _
    scope As XmlNamespaceScope _
) As IDictionary(Of String, String)
public virtual IDictionary<string, string> GetNamespacesInScope(
    XmlNamespaceScope scope
)

Parameters

Return Value

Type: System.Collections.Generic.IDictionary<String, String>
A collection of namespace names keyed by prefix which can be used to enumerate the namespaces currently in scope.

Implements

IXmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope)

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 describes the XmlNamespaceScope values and how it affects the whether or not the default and built-in namespaces are returned by the GetNamespacesInScope method.

XmlNamespaceScope Value

xmlns:xml

xmlns:xmlns

All

yes

no

no

ExcludeXml

no

no

no

Local

no

no

yes

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.