OwnerDocument Property

XmlNode.OwnerDocument Property

 

Gets the XmlDocument to which this node belongs.

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

public virtual XmlDocument OwnerDocument { 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:
© 2016 Microsoft