Record (token) types

Record types are values used to identify the purpose of each record parsed from the input document. The record type, along with the data stream options in the buffer info record (see Buffer info record), indicates the form of the record. Record forms are a means of indicating the number of values that make up the record itself, and are described in a separate section below. Here are the record types returned by the z/OS XML parser (their definitions are provided in gxlhxec.h for C and C++ callers, and GXLYXEC for assembler callers):
Table 1. Record types
Token name Meaning
GXLHXEC_TOK_BUFFER_INFO information about the buffer containing the parsed data stream
GXLHXEC_TOK_ERROR error information
GXLHXEC_TOK_XML_DECL an XML declaration
GXLHXEC_TOK_START_ELEM start of an element
GXLHXEC_TOK_END_ELEM end of an element
GXLHXEC_TOK_ATTR_NAME name of an attribute
GXLHXEC_TOK_ATTR_VALUE value of an attribute
GXLHXEC_TOK_NS_DECL a namespace declaration
GXLHXEC_TOK_CHAR_DATA character data
GXLHXEC_TOK_START_CDATA start of a CDATA section
GXLHXEC_TOK_END_CDATA end of a CDATA section
GXLHXEC_TOK_WHITESPACE a string of white space characters
GXLHXEC_TOK_PI processing instruction
GXLHXEC_TOK_COMMENT a comment
GXLHXEC_TOK_DTD_DATA DOCTYPE declaration information
GXLHXEC_TOK_UNRESOLVED_REF an entity reference that cannot be resolved
GXLHXEC_TOK_AUX_INFO auxiliary information about individual items in the parsed data stream
GXLHXEC_TOK_SCHEMA_LOCATION schema location information
GXLHXEC_TOK_ROOT_ELEMENT root element name
The above token names are for the C/C++ callers. Assembler callers use token names without the prefix "GXLH".

Most of the record types listed above fall into one of four classes, based on the number of values they contain from the document being parsed. Two of these record types - the buffer info and error records - are different (see Buffer info recordand Error info record) because they contain metadata about the information in one of the buffers (input or output), rather than data parsed from the input stream. The form of the data they contain is unique to the purpose of the record.

The data structures that describe this data stream can be found in the data model header file gxlhxeh.h for C/C++ callers, and the mapping macro GXLYXEH for assembler callers. Data is not aligned on any kind of boundary, and there are no alignment requirements for the input or output buffers provided by the caller.