CXML-PARSE-NEXT-RECORD

Parses the next record in the element of the specified handle.

Syntax:

CALL "C$XML" USING CXML-PARSE-NEXT-RECORD, string

Parameters:

CXML-PARSE-NEXT-RECORD Op-code 12. Numeric data item that specifies the operation to perform. Each operation is defined in acucobol.def, which is included with your system.
string pic x(n) or alphanumeric literal

On Entry:

CXML-PARSE-NEXT-RECORD Value 12
handle A parser handle returned by CXML-OPEN-FILE.

On Exit:

RETURN-CODE Returns 1 when another record follows.

Returns 0 when it has reached the end of the XML file.

Comments:

This option (in conjunction with CXML-OPEN-FILE) lets you parse individual records of a file, as opposed to parsing the entire file all at once. This operation parses the next record in the element of the specified handle. No data is returned, but now more data is available for retrieval by other op-codes. Return-code is 0 on error (including end-of-file) or non-zero if everything worked.

This option is more efficient than parsing entire files, but you must remember to parse the record before you try to retrieve its elements.

Note: To get a handle to the next record, use CXML-GET-NEXT-SIBLING.

Example:

CALL "C$XML" using CXML-OPEN-FILE "http://www.nws.noaa.gov/data/current_obs/KMYF.xml" 
move return-code to parser-handle 
CALL "C$XML" using CXML-PARSE-NEXT-RECORD parser-handle 
move return-code to record-handle