Partager via


documentElement Property (Windows CE 5.0)

Send Feedback

Contains the root element of the document.

[Script]

Script Syntax

varobjXMLDOMElement=oXMLDOMDocument.documentElement;objXMLDOMDocument.documentElement=objXMLDOMElement;

Script Parameters

None.

Script Return Value

Object. It returns IXMLDOMElement that represents the single element that represents the root of the XML document tree. It returns Null if no root exists.

[C/C++]

C/C++ Syntax

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

C/C++ Parameters

  • DOMElement
    [out, retval][in] IXMLDOMElement object that represents the single element representing 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 (for get_documentElement only)
    Value returned if there is no document element.
  • E_INVALIDARG (for get_documentElement only)
    Value returned if DOMElement is Null.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Msxml2.h, Msxml2.idl.

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

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.