Document processing model

There are three main components required for parsing XML documents: input buffer, z/OS XML parser, and output buffer. These three components and their interrelationships make up the processing model. There may be more than one input and output buffer, depending on the size of the document being parsed. If the document is sufficiently large, the caller may find it necessary to provide it to the parser in several pieces, using buffer spanning to maintain the document structure as it is being parsed. Similarly, the caller may need to provide multiple buffers to contain the data stream that the z/OS XML parser generates. For more information on how buffer spanning works, see Spanning buffers.

Document processing is the creation of the output buffers from the parsed input data. As the z/OS XML parser traverses through the input buffer, the output buffer is built. See Parsed data model for more information on this format.

The following is a diagram of the processing model using buffer spanning. It shows both the input and output buffers, where buffers 2-5 represent the additional buffers created to support a large document.
Figure 1. Processing model
A schematic of the processing model

For more on how to parse XML documents using the z/OS XML parser, see Parsing XML documents.