CXML-GET-ATTRIBUTE-BY-NAME

Syntax:

CALL "C$XML" USING CXML-GET-ATTRIBUTE-BY-NAME, handle, attr-regex-name,
                                                       attr-regex-flags, attr-idx, 
                                                       attr-name, attr-value, attr-len

Parameters:

CXML-GET-ATTRIBUTE-BY-NAME Op-code 15. 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
attr-regex-name A regular expression
attr-regex-flags

(Optional)

numeric value
attr-idx Numeric value
attr-name

(Optional)

pic x(n)
attr-value

(Optional)

Numeric value
attr-len

(Optional)

Numeric value

On Entry:

CXML-GET-ATTRIBUTE-BY-NAME Value 15
handle An element handle
attr-regex-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.
attr-idx One less than the starting index of attributes to search (use “0” to start at the first attribute). Is also the index of the attribute actually returned if successful.

This returned attribute number can be used in the next call to GET-ATTRIBUTE-BY-NAME to continue searching where you left off.

On Exit:

RETURN CODE

The named attribute

attr-name

(Optional)

(Optional) The name of the actual attribute returned.
attr-len

(Optional)

(Optional) The length of the attribute value.

Comments:

Attributes have special characteristics:

  • Attributes don't have a handle; they are attached to the element handle for which they are an attribute.
  • There can be more than one attribute per element, thus more than one attribute per element handle.
  • You don't need to call CXML-GET-DATA to fetch the attribute data. The op-code retrieves the data.