XmlNamespaceManager.GetNamespacesInScope(XmlNamespaceScope) 方法

定义

获取按前缀键键的命名空间名称的集合,该集合可用于枚举当前在作用域中的命名空间。

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

参数

scope
XmlNamespaceScope

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

返回

当前在作用域中的命名空间和前缀对的集合。

实现

注解

字典由一组按前缀键键的命名空间名称组成。 它可用于枚举作用域内命名空间。 字典是命名空间列表的断开连接副本。 当当前作用域内命名空间列表更改时,它保持不变。

下表显示了值如何影响 XmlNamespaceScope 方法返回 GetNamespacesInScope 的命名空间。

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

适用于

另请参阅