Previous Next

GET-DOCUMENT-ELEMENT( ) method
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:
Applies to:
 
Syntax 
GET-DOCUMENT-ELEMENT ( x-node-handle )
x-node-handle
A valid X-noderef handle to use for the root element.
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).

Previous Next
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates.