Understanding the contents of XML-CODE

When the parser returns control to your XML PARSE statement, XML-CODE contains the most recent value set by the parser or your processing procedure.

For all events except the EXCEPTION event, the value of the XML-CODE special register is zero. If you set the XML-CODE special register to -1 before you return control to the XML parser for an event other than EXCEPTION, processing stops with a user-initiated exception indicated by the returned XML-CODE value of -1. The result of changing the XML-CODE to any other nonzero value before returning from any event is undefined.

For the EXCEPTION event, special register XML-CODE contains the exception code.

The following figure shows the flow of control between the parser and your processing procedure and how XML-CODE is used to pass information between the two. The off-page connectors, such as Off-page flow-chart connector., connect the multiple charts in this chapter. In particular, E off-page connector. in the following figure connects to the chart Control flow for XML exceptions, and P off-page connector. connects from XML CCSID exception flow control.

Control flow between XML parser and program, showing XML-CODE usage

Flow chart of control flow between XML parser and program with XML-CODE usage, which is described in surrounding text.


[ Top of Page | Previous Page | Next Page | Contents | Index ]