Xmlnode_Object OwnerDocument Method

Returns the XmlDoc object for the DOM tree that contains the current node.

…xmlnode_object.OwnerDocument

Prerequisites

None

Parameters

None

Remarks

This method provides a back-pointer for the current node to the XmlDoc object for the node’s DOM tree. Normally, all nodeobjects have an associated XmlDoc object, unless the document tree was freed by some other method.

If the current object has no associated document, an exception is thrown.

Examples

Dim doc1 As XmlDoc
Dim
doc2 As XmlDoc
Dim
root As XmlNode
doc1 = New XmlDoc("my_doc")
root = doc1.DocumentElement
doc2 = root.OwnerDocument
' doc1 and doc 2 point to same object, doc1 Is doc2

See Also

XML Classes | xmlnode_object.ParentNode