PreviousNextIndex

IMPORT-NODE( ) method

Import a copy of a node from another document into this document. The first parameter must be a valid X-noderef handle and will refer to the newly copied XML node if the method succeeds. The new node is associated with this document, but must be appended or inserted with APPEND-CHILD( ) or INSERT-BEFORE( ) to become part of the structure.

Return type: LOGICAL

Applies to: X-document object handle

Syntax
IMPORT-NODE( x-node , x-source-node , deep ) 

x-node
x-source-node
deep

If hDoc is an existing and loaded X-document and hDocCopy is existing but empty and hRoot and hRootCopy are X-noderefs, you can copy hDoc to hDocCopy as follows:

/* Associates hRoot with the root node of the hDoc document. */ 
hDoc:GET-DOCUMENT-ELEMENT(hRoot). 
hDocCopy:IMPORT-NODE(hRootCopy, hRoot, TRUE). 
hDocCopy:APPEND-CHILD(hRootCopy). 


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex