Microsoft XML 2.5 SDK


 

IXMLDOMNode::get_ownerDocument Method

[This is preliminary documentation and subject to change.]

Returns the root of the document that contains this node.

Visual Basic Syntax

Set objXMLDOMDocument = oXMLDOMNode.ownerDocument

C/C++ Syntax

HRESULT get_ownerDocument(

    IXMLDOMDocument **DOMDocument);

Parameters

DOMDocument

[out]
Address of the parent document object that represents the root of the document.

C/C++ Return Values

S_OK

Value returned if successful.

E_INVALIDARG

Value returned if DOMDocument is null.

Remarks

This property indicates the document to which this node belongs.

All nodes are created in the context of a document, and the ownerDocument property is maintained until the node is added to another document. For a node removed from a document, this property indicates the document in which the node was last included.