Try OpenEdge Now
skip to main content
Working with XML
Reading and Writing XML with the Document Object Model (DOM) : Creating XML output from ABL : Creating and appending a node
 

Creating and appending a node

In order to create an actual XML node, you use the CREATE-NODE( ) method on the parent object. After the node is created, you must append it to its parent by using the APPEND-CHILD( ) method. The following code fragment is an example of creating and appending the root node:
DEFINE VARIABLE hRoot AS HANDLE NO-UNDO.
CREATE X-NODEREF hRoot.
hDoc:CREATE-NODE(hRoot,"Root","ELEMENT").
hDoc:APPEND-CHILD(hRoot).
. . .