Retrieves the root element of the document. The parameter must be a valid X-noderef handle and will refer to the document's root element if the method succeeds.
Return type: LOGICAL
Applies to: X-document object handle
The following example demonstrates the use of GET-DOCUMENT-ELEMENT if hDoc is an X-document and hRoot is an X-noderef:
/* Creates an ABL document object & initializes the associated XML
object. */
CREATE X-document hDoc.
/* Creates an ABL reference for an XML node in a parse tree. */
CREATE X-NODEREF hRoot.
/* Reads the myxml.xml document into an XML parse tree. */
hDoc:LOAD("file","myxml.xml",false).
/* Associates hRoot with the root node of the hDoc document. */
hDoc:GET-DOCUMENT-ELEMENT(hRoot).
|