Because the data stream that the z/OS XML parser generates in the output buffer consists of one or more groups of records, each group always begins with the buffer info record - a record containing metadata about the parsed data stream contained in the current output buffer. This record includes the length of the buffer used by the record group and flags indicating the characteristics of the data stream.
Fields | ||||
---|---|---|---|---|
+0 | record type | flags | reserved | |
+4 | record length | |||
+8 | datastream options | |||
+C | parse status | reserved | ||
+10 | buffer length used | |||
+14 | ||||
+18 | offset to error record | |||
+20 |
The "parser status" field is another set of flags in the buffer info record. If an unresolved external reference is present in this buffer, the unresolved reference bit will be on. If a non-representable character reference is present in this or a subsequent buffer for this document, the non-representable character reference bit will be on.
The "buffer length used" field indicates the portion of the output buffer consumed by the group of records represented by this buffer info record. If no buffers are spanned during the parse process, there will be only one buffer info record present in the output buffer, representing a single group of records. If buffers are spanned, there may be several record groups, each with corresponding buffer info records present in the output buffer. The number of record groups and buffer info records depends on how the caller manages the buffers that are passed to the parser. See Spanning buffers for more information.
The "error record offset" field indicates the offset from the beginning of the buffer info record to the beginning of the error info record. If this offset is zero, there is no error record present in the group of records represented by the buffer info record.