PreviousNextIndex

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: LOGICAL

Applies to: X-document object handle, X-noderef object handle

Syntax
INSERT-BEFORE( x-ref-handle1 , x-ref-handle2 ) 

x-ref-handle1
x-ref-handle2

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). 
. . . 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex