Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Understanding the encoding of XML documents

To parse an XML document with the XML PARSE statement, the document must be encoded using a supported encoding. The supported encodings for a particular parse depend on:

For XML documents that are contained in a national data item, the supported code page is Unicode UTF-16BE (big-endian), CCSID 1200.

For XML documents that are contained in an alphanumeric data item, the supported code pages when the XMLPARSE(XMLSS) compiler option is in effect are:

For XML documents that are contained in an alphanumeric data item, the supported code pages when the XMLPARSE(COMPAT) compiler option is in effect are specified in the related reference about Coded character sets for XML documents.

Determining the encoding of an input XML document

The parser must know the encoding for an XML document in order to process it correctly. If the specified encoding is not one of the supported coded character sets, the parser signals an XML exception event before beginning the parse operation. If the actual document encoding does not match the specified encoding, the parser signals an appropriate XML exception after beginning the parse operation.

Several sources of encoding information are used in determining the encoding of an XML document:

When the XMLPARSE(XMLSS) option is in effect:

related references  
XMLPARSE
    
Coded character sets for XML documents


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)