Share via


XmlDataProvider.Document 屬性

定義

取得或設定要作為繫結來源的 XmlDocument

public:
 property System::Xml::XmlDocument ^ Document { System::Xml::XmlDocument ^ get(); void set(System::Xml::XmlDocument ^ value); };
public System.Xml.XmlDocument Document { get; set; }
member this.Document : System.Xml.XmlDocument with get, set
Public Property Document As XmlDocument

屬性值

作為繫結來源使用的 XmlDocument。 預設值是 null

備註

XmlDataProvider 會公開下列存取 XML 資料的方式。

  • 您可以使用 類別內嵌內嵌 XML 資料 XmlDataProvider

  • 您可以將 屬性設定 SourceUri XML 資料檔案的 。

  • 您可以將這個屬性設定為 XmlDocument

XmlDataProvider 在事件發生時 XmlDocument.NodeChanged ,會執行所有系結的完整重新整理。 沒有特定節點的優化。

Source如果已設定 屬性,則會捨棄任何內嵌 XML 資料。 Document如果已設定屬性,則會 Source 清除屬性,並捨棄任何內嵌 XML 資料。

設定下列屬性會隱含地造成此 XmlDataProvider 物件重新整理: SourceDocumentXmlNamespaceManagerXPath 。 變更多個重新整理原因的屬性時,建議使用 DeferRefresh

適用於