Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


XML PARSE exceptions that allow continuation

The following table shows the exception codes that are associated with the XML EXCEPTION event and that the XML parser returns in special register XML-CODE when the parser can continue processing the XML data.

That is, the code is within one of the following ranges:

The table describes each exception and the actions that the parser takes when you request that it continue after the exception. Some of the descriptions use the following terms:

For definitions of the terms, see the related task below about understanding the encoding of XML documents.

Table 97. XML PARSE exceptions that allow continuation
Code Description Parser action on continuation
1 The parser found an invalid character while scanning white space outside element content. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
2 The parser found an invalid start of a processing instruction, element, comment, or document type declaration outside element content. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
3 The parser found a duplicate attribute name. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
4 The parser found the markup character '<' in an attribute value. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
5 The start and end tag names of an element did not match. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
6 The parser found an invalid character in element content. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
7 The parser found an invalid start of an element, comment, processing instruction, or CDATA section in element content. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
8 The parser found in element content the CDATA closing character sequence ']]>' without the matching opening character sequence '<![CDATA['. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
9 The parser found an invalid character in a comment. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
10 The parser found in a comment the character sequence '' (two hyphens) not followed by '>'. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
11 The parser found an invalid character in a processing instruction data segment. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
12 A processing instruction target name was 'xml' in lowercase, uppercase, or mixed case. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
13 The parser found an invalid digit in a hexadecimal character reference (of the form &#xdddd;). The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
14 The parser found an invalid digit in a decimal character reference (of the form &#dddd;). The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
15 The encoding declaration value in the XML declaration did not begin with lowercase or uppercase A through Z. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
16 A character reference did not refer to a legal XML character. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
17 The parser found an invalid character in an entity reference name. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
18 The parser found an invalid character in an attribute value. The parser continues detecting errors until it reaches the end of the document or encounters an error that does not allow continuation. The parser does not signal any further normal events, except for the END-OF-DOCUMENT event.
70 The basic document encoding was EBCDIC, and the external EBCDIC code page is supported, but the document encoding declaration did not specify a supported EBCDIC code page. The parser uses the encoding specified by the external EBCDIC code page.
71 The basic document encoding was EBCDIC, and the document encoding declaration specified a supported EBCDIC encoding, but the external EBCDIC code page is not supported. The parser uses the encoding specified by the document encoding declaration.
72 The basic document encoding was EBCDIC, the external EBCDIC code page is not supported, and the document did not contain an encoding declaration. The parser uses EBCDIC code page 1140 (USA, Canada, . . . Euro Country Extended Code Page).
73 The basic document encoding was EBCDIC, but neither the external EBCDIC code page nor the document encoding declaration specified a supported EBCDIC code page. The parser uses EBCDIC code page 1140 (USA, Canada, . . . Euro Country Extended Code Page).
80 The basic document encoding was ASCII, and the external ASCII code page is supported, but the document encoding declaration did not specify a supported ASCII code page. The parser uses the encoding specified by the external ASCII code page.
81 The basic document encoding was ASCII, and the document encoding declaration specified a supported ASCII encoding, but the external ASCII code page is not supported. The parser uses the encoding specified by the document encoding declaration.
82 The basic document encoding was ASCII, but the external ASCII code page is not supported, and the document did not contain an encoding declaration. The parser uses ASCII code page 1252 (MS Windows Latin 1).
83 The basic document encoding was ASCII, but neither the external ASCII code page nor the document encoding declaration specified a supported ASCII code page. The parser uses ASCII code page 1252 (MS Windows Latin 1).
92 The document data item was alphanumeric, but the basic document encoding was Unicode UTF-16. The parser uses code page 1202 (Unicode UTF-16).
100,001 - 165,535 The external EBCDIC code page and the document encoding declaration specified different supported EBCDIC code pages. XML-CODE contains the code page CCSID for the encoding declaration plus 100,000. If you set XML-CODE to zero before returning from the EXCEPTION event, the parser uses the encoding specified by the external EBCDIC code page. If you set XML-CODE to the CCSID for the document encoding declaration (by subtracting 100,000), the parser uses this encoding.
200,001 - 265,535 The external ASCII code page and the document encoding declaration specified different supported ASCII code pages. XML-CODE contains the CCSID for the encoding declaration plus 200,000. If you set XML-CODE to zero before returning from the EXCEPTION event, the parser uses the encoding specified by the external ASCII code page. If you set XML-CODE to the CCSID for the document encoding declaration (by subtracting 200,000), the parser uses this encoding.

related concepts
The content of XML-CODE

related tasks
Understanding the encoding of XML documents
Handling exceptions that the XML parser finds


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)