CXML-GET-COMMENT

Syntax:

CALL "C$XML" USING CXML-GET-COMMENT, handle, data, len

Parameters:

CXML-GET-COMMENT Op-code 24. 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
data pic x(n)
len

(Optional)

pic x(n)

On Entry:

CXML-GET-COMMENT Value 24
handle Is an element handle or parser handle.

On Exit:

data

Is returned as the comment for the handle.

len (If provided) is the length of the comment.

Comments:

  • XML files generated by ACUCOBOL-GT have a comment at the top level with the generation date and time. This comment is removed from the comments returned to the COBOL program with CXML-GET-COMMENT.
  • When a multi-line comment is included in the file, each line is returned to the COBOL program as a single string separated by a single byte of low-values. For example:
    <!-- line 1
         line 2
         line 3 -->

    is returned to the COBOL program as a single string:

    line 1\n     line 2\n     line 3

    where the \n is Hex 0A.

  • When multiple comments are included in a single file, for example:
    <!-- line 1 --> 
    <!-- line 2 -->
    <!-- line 3 -->

    These are separated in the returned data item with low-values separating the different comments:

    line 1\0line 2\0line 3

    where the \0 is a single byte of low-values.

  • If you pass the third optional len parameter to C$XML when getting comments, the length in bytes is returned in that parameter.