Bagikan melalui


IXmlNamespaceResolver.GetNamespacesInScope Method

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

Gets a collection of defined prefix-namespace mappings that are currently in scope.

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

Syntax

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

Parameters

Return Value

Type: System.Collections.Generic.IDictionary<String, String>
An IDictionary that contains the current in-scope namespaces.

Remarks

The collection is keyed by prefix and can be used to enumerate the namespaces currently in scope. The collection is a disconnected copy of the current namespace list.

The following table lists 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.