XPathNavigator.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 值,指定要傳回的命名空間。

傳回

IDictionary<String,String>

以前置詞當做索引鍵的命名空間名稱之 IDictionary<TKey,TValue> 集合。

實作

備註

傳回的命名空間取決於 XmlNamespaceScope 指定的值。

XmlNamespaceScope 值 傳回的命名空間
All 在目前節點範圍中定義的所有命名空間, 這包括一律以隱含方式宣告的 xmlns:xml 命名空間。 命名空間傳回的順序並無定義。
ExcludeXml 目前節點範圍中定義的所有命名空間,不包括一律以隱含方式宣告的 xmlns:xml 命名空間。 命名空間傳回的順序並無定義。
Local 在目前節點上本機定義的所有命名空間。

適用於