CXML-GET-SIBLING-BY-NAME

Syntax:

CALL "C$XML" USING CXML-GET-SIBLING-BY-NAME, handle, regex, flags

Parameters:

CXML-GET-SIBLING-BY-NAME Op-code 20. 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
regex A regular expression
flags

(Optional)

Numeric value

On Entry:

CXML-GET-SIBLING-BY-NAME Value 20
handle An element handle.
flags

(Optional)

A collection of flags to apply to the regular expression. The valid flags are listed in acucobol.def and described under C$REGEXP op-code 2. They can be added together to get more than one flag.

On Exit:

RETURN-CODE

The handle of the returned child, or “0” if no such child exists.

Comments:

This operation retrieves the named sibling element. Once you have the handle to the element of interest, you can call CXML-GET-DATA to retrieve the data associated with the element.

Example:

call "C$XML" using CXML-GET-SIBLING-BY-NAME
                      ele-1-handle
                      "weather"
                      0
   move return-code to ele-2-handle
   call "C$XML" using CXML-GET-DATA
                      ele-2-handle
                      throw-away
                      weather-val.