Previous Next

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:
Applies to:
 
Syntax 
IMPORT-NODE ( x-node , x-source-node , deep )
x-node
A valid X-noderef handle to use for the new XML node.
x-source-node
A valid X-noderef handle that represents the node to import from.
deep
A logical that if TRUE specifies that the whole sub-tree is to be copied. The default value is FALSE.
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).

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