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

適用於