Depending on the type of processing, a COBOL program can process an XML document which is made available in working memory or in a file:
Processing type |
XML document |
|
in memory |
in file |
|
Structure-oriented |
X |
X |
Event-oriented |
X |
– |
If the XML document is made available in a file, the file’s BS2000/OSD access method is irrelevant. The breakdown of the XML document into records is visible to the processing program: each record change in he XML document is replaced by an end-of-line character, i.e. the equivalent of the ASCII character X'0A' in the encoding in which the program received data from the XML document. However, the insertion of additional end-of-line characters can also be suppressed if the relevant control mechanism XML-LINE-FEED=IGNORED is set during compilation, see section "RUNTIME-OPTIONS option".