CALL "C$XML" USING CXML-GET-COMMENT, handle, data, len
| 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) |
| CXML-GET-COMMENT | Value 24 |
| handle | Is an element handle or parser handle. |
| data |
Is returned as the comment for the handle. |
| len | (If provided) is the length of the comment. |
Comments:
When comments are returned to the COBOL program, they are separated by a single byte of low-values as they are in the XML file. For example:
is returned to the COBOL program as a single string. But this comment:
is returned to the COBOL program with a single byte of LOW-VALUES separating the separate lines and comment. The final line is terminated by two bytes of LOW-VALUES, so you know how many lines of comments are in the XML file.
If you pass the third optional len parameter to C$XML when getting comments, the length in bytes is returned in that parameter.