XmlNode.OwnerDocument 屬性

定義

取得這個節點所屬的 XmlDocument

public:
 virtual property System::Xml::XmlDocument ^ OwnerDocument { System::Xml::XmlDocument ^ get(); };
public virtual System.Xml.XmlDocument OwnerDocument { get; }
public virtual System.Xml.XmlDocument? OwnerDocument { get; }
member this.OwnerDocument : System.Xml.XmlDocument
Public Overridable ReadOnly Property OwnerDocument As XmlDocument

屬性值

這個節點所屬的 XmlDocument

如果這個節點是 XmlDocument (NodeType 等於 XmlNodeType.Document),則這個屬性傳回 null

範例

如需使用此屬性的範例,請參閱 OwnerDocument xmlElement 類別中的 () 。

備註

當將節點加入至目前節點中,使用XmlDocument所傳回OwnerDocument來建立節點的屬性。

適用於