isCOBOL Evolve : Appendices : Library Routines : C$XML : CXML-GET-CHILD-BY-ATTR-VALUE
CXML-GET-CHILD-BY-ATTR-VALUE
The CXML-GET-CHILD-BY-ATTR-VALUE function returns the handle of the child element that includes an attribute with a given value.
Syntax:
 CALL "C$XML" USING CXML-GET-CHILD-BY-ATTR-VALUE
                    handle
                    attrValue
                    attrFlags
             GIVING childHandle
Parameters:
CXML-GET-CHILD-BY-ATTR-VALUE
Constant
 
handle
USAGE HANDLE
A XML element handle.
attrValue
PIC X(n)
It specifies the attribute value to search.
attrFlags
PIC 9(n)
It specifies if the search should consider case. Valid values are:
0 - case sensitive search
1 - case insensitive search
Return code:
childHandle must be a USAGE HANDLE data item. It receives the handle of the found child element or 0 if no child was found. It’s good practice to free this handle with a DESTROY statement before reusing it in order to avoid memory leaks.