In your processing procedure, code statements to handle XML events.
For each event that the parser encounters, it passes information to your processing procedure in several special registers, as shown in the following table. Use these registers to populate the data structures and to control the processing.
When used in nested programs, these special registers are implicitly defined as GLOBAL in the outermost program.
Restriction: A processing procedure must not directly execute an XML PARSE statement. However, if a processing procedure passes control to a method or outermost program by using an INVOKE or CALL statement, the target method or program can execute the same or a different XML PARSE statement. You can also execute the same XML statement or different XML statements simultaneously from a program that is running on multiple threads.
The compiler inserts a return mechanism after the last statement in each processing procedure. You can code a STOP RUN statement in a processing procedure to end the run unit. However, an EXIT PROGRAM statement (when a CALL statement is active) or a GOBACK statement does not return control to the parser. Using either of these statements in a processing procedure results in a severe error.
related concepts
The content of XML-CODE
The content of XML-TEXT and XML-NTEXT
related tasks
Transforming XML text to COBOL data items
Converting to or from national (Unicode) representation
related references
XML PARSE exceptions that allow continuation
XML PARSE exceptions that do not allow continuation
XML-CODE
(COBOL for Windows Language Reference)
XML-EVENT
(COBOL for Windows Language Reference)
XML-NTEXT
(COBOL for Windows Language Reference)
XML-TEXT
(COBOL for Windows Language Reference)