XML DOM » Node » ownerDocument

Syntax:
node.ownerDocument

This property returns the Document object to which the node belongs. If the node itself is a document, then it returns null.

Examples

Code:
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objXMLDoc.async = False
objXMLDoc.load("states.xml")

Dim objNode
Set objNode = objXMLDoc.documentElement.ownerDocument
document.write(objNode.nodeName)
Output:
#document
Explanation:

This example gets the parent document of the root node of the 'states.xml' file, and displays its nodeName.

Language(s): VBScript