XPathNavigator.GetNamespacesInScope(XmlNamespaceScope) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回当前节点的范围内命名空间。
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 返回的命名空间的值。
返回
按 IDictionary<TKey,TValue> 前缀键键的命名空间名称的集合。
实现
注解
返回的命名空间取决于 XmlNamespaceScope 指定的值。
| XmlNamespaceScope 值 | 返回的命名空间 |
|---|---|
| All | 在当前节点范围内定义的所有命名空间。 这包括 xmlns:xml 始终隐式声明的命名空间。 未定义返回的命名空间的顺序。 |
| ExcludeXml | 当前节点范围内定义的所有命名空间,不包括 xmlns:xml 始终以隐式声明的命名空间。 未定义返回的命名空间的顺序。 |
| Local | 在当前节点上本地定义的所有命名空间。 |