CXML-ADD-SIBLING

Syntax:

CALL "C$XML" USING CXML-ADD-SIBLING, handle, elem-name, elem-data, data-len

Parameters:

CXML-ADD-SIBLING Op-code 28. Numeric data item that specifies the operation to perform. Each operation is defined in acucobol.def, which is included with your system.
handle USAGE handle
elem-name Literal or pic x(n)
elem-data

Optional

Literal or pic x(n)
data-len

(Optional)

Numeric literal or pic x(n)

On Entry:

CXML-ADD-SIBLING Value 28
handle An element handle.
elem-data (Optional) The value of the new sibling element. By default, this is blank.
data-len (Optional) The length of the new sibling element. If omitted, it defaults to the size of the data item.

On Exit:

RETURN-CODE A handle to the new sibling element.

Comments:

This operation adds a new sibling element to the list of children already in the specified element. The new element will be the last in the list.

Example:

*Add the first field of the record, which will be a child of 
*the last element.
   call "C$XML" using CXML-ADD-CHILD 
                  element-handle
                  "cus-key"
                  "555-55-5555"
   move return-code to element-handle.

*Add the rest of the record
   call "C$XML" using CXML-ADD-SIBLING 
                  element-handle
                  "cus-name"
                  "Micro Focus"
   move return-code to element-handle.

   call "C$XML" using CXML-ADD-SIBLING 
                  element-handle
                  "cus-addr"
                  "The Lawn, 22-30 Old Bath Road"
   move return-code to element-handle.