User Routine

You need to include a user routine in your program. This routine typically contains an EVALUATE statement that handles the XML-EVENT values. The parser continually provides fragment information to the user routine until the entire document has been processed or until a fatal error is encountered. If malformed XML is encountered by the parser, an error code is placed into the special register XML-CODE, and control is transferred to an imperative statement. For non-fatal errors however, the user routine has the option of resetting XML-CODE to zero and and thus continuing execution. It also has the option of setting XML-CODE to -1 for a normal event. This causes the parser to terminate, but without generating an exception event.