Exporter (0) Imprimer
Développer tout

XmlNamespaceManager.GetNamespacesInScope Method

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

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)

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

xmlns=""

All

yes

no

no

ExcludeXml

no

no

no

Local

no

no

yes

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

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

Ajouts de la communauté

AJOUTER
Afficher:
© 2014 Microsoft