Contains the root element of the document.
Visual Basic Syntax
Set objXMLDOMElement = oXMLDOMDocument.documentElement
C/C++ Syntax
HRESULT get_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 Values
- S_OK
- Value returned if successful.
- S_FALSE
- Value when returning null.
- E_INVALIDARG
- Value returned if DOMElement is null.
Contains the root element of the document.
Visual Basic Syntax
objXMLDOMDocument.documentElement = objXMLDOMElement
C/C++ Syntax
HRESULT put_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.