An XML event results when the XML parser detects various conditions (such as END-OF-INPUT or EXCEPTION) or encounters document fragments (such as CONTENT-CHARACTERS or START-OF-CDATA-SECTION) while processing an XML document.
For each event that occurs during XML parsing, the parser sets the associated event name in the XML-EVENT special register, and passes the XML-EVENT special register to the processing procedure. Depending on the event, the parser sets other special registers to contain additional information about the event.
In most cases, the parser sets the XML-TEXT or XML-NTEXT special register to the XML fragment that caused the event: XML-NTEXT if the XML document is in a national data item, or if the parser finds a character reference; otherwise, XML-TEXT.
When the parser detects an encoding conflict or a well-formedness error in the document, it sets XML-EVENT to 'EXCEPTION' and provides additional information about the exception in the XML-CODE special register.
For a detailed description of the set of XML events, see the related reference about XML-EVENT.
related concepts
XML parser in COBOL
XML-CODE
XML-TEXT and XML-NTEXT
related tasks
Writing procedures to process XML
related references
XML PARSE exceptions
XML-EVENT (COBOL for AIX Language Reference)