Previous Next

INSERT-BEFORE( ) method
Insert a node as a child of this document before another node (or last if the other node is unknown). This is one way to place the node into the document structure after the node has been created with the CREATE-NODE( ) or CREATE-NODE-NAMESPACE( ) method, cloned with the CLONE-NODE( ) method, or removed with the REMOVE-NODE( ) method. (Similar to the APPEND-CHILD( ) method.)
Return type:
Applies to:
 
Syntax 
INSERT-BEFORE ( x-ref-handle1 , x-ref-handle2 )
x-ref-handle1
The handle that represents the node to insert as a child of this document.
x-ref-handle2
A handle that represents the XML node that the node is to be inserted before. If unknown, the node will be appended as the last child.
The following code fragment demonstrates the use of the INSERT-BEFORE( ) method. hNoderefParent ends up with hNoderef and hNoderef2 in that order:
 
. . .
hDoc:CREATE-NODE(hNoderef,bufField:NAME,"ELEMENT").
hNoderefParent:INSERT-BEFORE(hNoderef,hNoderef2).
. . .

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