Progress
Language Reference


APPEND-CHILD( ) Method

Appends a node as the last child node of this XML document or element node. This connects a 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 disconnected with the REMOVE-NODE( ) method. This has no effect on the node reference.

If the node is already in the tree, it is disconnected from its present location and then connected at the specified location.

Return Type: LOGICAL

Applies To: X-document Object Handle, X-noderef Object Handle

SYNTAX
APPEND-CHILD( x-node-handle ) 

x-node-handle

The handle that represents the node to append to this XML document or element node. x-node-handle must refer to a node in this document. You cannot use APPEND-CHILD( ) to move a node from one document to another.

The following code fragment demonstrates creating a node in a tree with the name and value of a field:

. . .
hDoc:CREATE-NODE(hNoderef,bufField:NAME,"ELEMENT").
hNoderefParent:APPEND-CHILD(hNoderef).
hDoc:CREATE-NODE(hText,"","TEXT").
hText:NODE-VALUE = STRING(bufField:BUFFER-VALUE).
hNoderef:APPEND-CHILD(hText).
. . . 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095