XmlNode.OwnerDocument Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the XmlDocument to which this node belongs.

Namespace:   System.Xml
Assembly:  System.Xml (in System.Xml.dll)

abstract OwnerDocument : XmlDocument with get
override OwnerDocument : XmlDocument with get

Property Value

Type: System.Xml.XmlDocument

The XmlDocument to which this node belongs.

If the node is an XmlDocument (NodeType equals XmlNodeType.Document), this property returns null.

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

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

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: