You can process XML input in your COBOL program by using the XML PARSE statement.
The XML PARSE statement is the COBOL language interface to either of two high-speed XML parsers. You use the XMLPARSE compiler option to choose the appropriate parser for your application:
Processing XML input involves passing control to and receiving control from the XML parser. You start this exchange of control by using the XML PARSE statement, which specifies a processing procedure that receives control from the XML parser to handle the parser events.
You use special registers in your processing procedure to exchange information with the parser.
Use the following COBOL facilities to process XML input:
The XML namespace special registers are undefined outside the processing procedure.
You can use the ENCODING phrase and the RETURNING NATIONAL phrase of the XML-PARSE statement only when the XMLPARSE(XMLSS) compiler option is in effect.
Link-edit considerations: COBOL programs that contain the XML PARSE statement must be link-edited with AMODE 31.
related concepts
XML parser in COBOL
related tasks
Accessing XML documents
Parsing XML documents
Understanding the encoding of XML documents
Handling XML PARSE exceptions
Terminating XML parsing
related references
XML reference material
XMLPARSE
Extensible Markup Language (XML)