Export (0) Print
Expand All

XmlNode.OwnerDocument Property

Gets the XmlDocument to which this node belongs.

[Visual Basic]
Public Overridable ReadOnly Property OwnerDocument As XmlDocument
[C#]
public virtual XmlDocument OwnerDocument {get;}
[C++]
public: __property virtual XmlDocument* get_OwnerDocument();
[JScript]
public function get OwnerDocument() : XmlDocument;

Property Value

The XmlDocument to which this node belongs.

If the node is an XmlDocument (NodeType equals XmlNodeType.Document), this property returns a null reference (Nothing in Visual Basic).

Remarks

When adding nodes to the current node, use the XmlDocument returned by the OwnerDocument property to create the node.

Example

See OwnerDocument (in the XmlElement class) for an example using this property.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

XmlNode Class | XmlNode Members | System.Xml Namespace

Show:
© 2014 Microsoft