Overview
ISO/IEC TR 24716:2007 - "Information technology - Programming languages, their environment and system software interfaces - Native COBOL Syntax for XML Support" defines how COBOL programs can natively process XML. Published as a Technical Report (type 2), it extends ISO/IEC 1989:2002 (COBOL) to specify syntax and semantics for reading, updating, and writing XML documents, aiming to improve portability across implementations while acknowledging that some elements are experimental and subject to further refinement.
Key topics and requirements
- Native XML support in COBOL: New language elements and clauses enable COBOL programs to handle XML documents directly rather than via external tools.
- DOM-style processing: Provides a Document Object Model (DOM)-like internal representation for parsing, updating, and serializing XML.
- Well-formedness and optional validation: COBOL processors must check that XML is well-formed (XML 1.0/1.1) and may optionally validate against a DTD or XML Schema.
- XML file organization and access mode: Introduces an XML file organization and an XML access mode. Files can contain one or more XML documents (subject to processor behavior), and document order is treated as sequential.
- Element position vector: Conceptual mechanism to maintain positions of elements and attributes within the XML hierarchy; affected by OPEN, READ, START, CLOSE operations.
- I/O integration: Extends COBOL I/O statements (OPEN, READ, START, WRITE, REWRITE, DELETE, CLOSE) and IDENTIFIED clauses to target XML elements and attributes.
- Language changes: Adds reserved/context-sensitive words (e.g., DOCUMENT, IDENTIFIED, VERSION-XML) and clauses (e.g., SCHEMA TYPE, VALIDITY TYPE, NAMESPACE IDENTIFIED) to support XML semantics.
- Character/entity handling: Specifies how character references, predefined/general entity references, CDATA, and normalization are handled per the applicable XML recommendations.
Practical applications and users
Who benefits:
- COBOL developers maintaining enterprise applications that must exchange XML with modern services.
- Compiler and runtime implementers who need to add standardized XML handling to COBOL environments.
- Enterprise IT teams modernizing legacy systems for XML-based integration (web services, data interchange).
- System integrators mapping COBOL record structures to XML documents for interoperability.
Typical uses:
- Reading XML payloads into COBOL record descriptions using IDENTIFIED clauses.
- Updating and serializing XML documents from COBOL logic.
- Validating incoming XML against DTDs or XML Schemas before processing.
- Enabling COBOL-based middleware to interact with XML web services and message queues.
Related standards
- ISO/IEC 1989:2002 - COBOL (base language)
- W3C XML 1.0 and XML 1.1 Recommendations
- Namespaces in XML (W3C)
- XML Schema Part 1: Structures and Part 2: Datatypes
Keywords: ISO/IEC TR 24716:2007, native COBOL syntax for XML support, COBOL XML, XML processing in COBOL, DOM-style parsing, element position vector, IDENTIFIED clause, XML file organization.