Microsoft XML 2.5 SDK


 

IXMLDOMDocument::putref_documentElement Method

[This is preliminary documentation and subject to change.]

Contains the root element of the document.

Visual Basic Syntax

Set objXMLDOMDocument.documentElement = objXMLDOMElement

C/C++ Syntax

HRESULT putref_documentElement(

    IXMLDOMElement *DOMElement);

Parameters

DOMElement

[out]
IXMLDOMElement object that represents the single element that represents the root of the XML document tree. Returns NULL if no root exists.

C/C++ Return Value

Returns S_OK if successful, or an error code otherwise.

Remarks

When setting the documentElement property, the specified element node is inserted into the child list of the document after any document type node. To precisely place the node within the children of the document, call the IXMLDOMNode object's insertBefore method.

The parentNode property is reset to the document node as a result of this operation.