Accessing XML documents
Before
you can parse an XML document with an XML PARSE statement, you must
make the document available to your program. Common methods of acquiring the
document are from a parameter to your program or from a file.
If the XML document that you want to parse is held in a file, use ordinary
COBOL facilities to place the document into a data item in your program:
- A FILE-CONTROL entry to define the file to your program
- An OPEN statement to open the file
- READ statements to read all the records from the file into a data
item (either an elementary item of category alphanumeric or national,
or an alphanumeric or national group) that is defined in the WORKING-STORAGE
SECTION or LOCAL-STORAGE SECTION
- Optionally the STRING statement to string all of the separate
records together into one continuous stream, to remove extraneous blanks,
and to handle variable-length records
|