Share via


documentElement Property

Contains the root element of the document.

var objXMLDOMElement = oXMLDOMDocument.documentElement;
objXMLDOMDocument.documentElement = objXMLDOMElement;

HRESULT get_documentElement(
  IXMLDOMElement** DOMElement
);
HRESULT putref_documentElement(
  IXMLDOMElement* DOMElement
);

General 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 IXMLDOMNodeinsertBefore method.

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

The property is read/write, and applies to the following objects and interfaces:

DOMDocument, IXMLDOMElement, and IXMLDOMNode.

See Also

insertBefore Method | parentNode Property

 Last updated on Saturday, April 10, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.