다음을 통해 공유


documentElement Property (Windows Embedded CE 6.0)

1/6/2010

Contains the root element of the document.

Script Syntax

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

Remarks

Ee502036.collapse(en-US,WinEmbedded.60).gifScript Parameters

None.

Ee502036.collapse(en-US,WinEmbedded.60).gifScript 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.

Ee502036.collapse(en-US,WinEmbedded.60).gifC/C++ Syntax

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

Remarks

Ee502036.collapse(en-US,WinEmbedded.60).gifC/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.

Ee502036.collapse(en-US,WinEmbedded.60).gifC/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.

Ee502036.collapse(en-US,WinEmbedded.60).gifRequirements

Header msxml2.h, msxml2.idl
Windows Embedded CE Windows CE .NET 4.0 and later

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 IXMLDOMNode insertBefore 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

Reference

XML DOM Properties

Concepts

parentNode Property

Other Resources