IXmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope) 方法

定义

获取当前在范围内的已定义前缀/命名空间映射的集合。

public:
 System::Collections::Generic::IDictionary<System::String ^, System::String ^> ^ GetNamespacesInScope(System::Xml::XmlNamespaceScope scope);
public System.Collections.Generic.IDictionary<string,string> GetNamespacesInScope (System.Xml.XmlNamespaceScope scope);
abstract member GetNamespacesInScope : System.Xml.XmlNamespaceScope -> System.Collections.Generic.IDictionary<string, string>
Public Function GetNamespacesInScope (scope As XmlNamespaceScope) As IDictionary(Of String, String)

参数

scope
XmlNamespaceScope

一个 XmlNamespaceScope 值,指定要返回的命名空间节点的类型。

返回

IDictionary<String,String>

一个包含当前在范围内的命名空间的 IDictionary

注解

集合按前缀键键,可用于枚举当前在作用域中的命名空间。 集合是当前命名空间列表的断开连接副本。

下表列出了 XmlNamespaceScope 值,以及它如何影响该方法是否返回 GetNamespacesInScope 默认命名空间和内置命名空间。

XmlNamespaceScope 值 xmlns:xml xmlns:xmlns xmlns=“”
All
ExcludeXml
Local

适用于