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 No
ExcludeXml No No No
Local No No Yes

適用於

另請參閱