XML PARSE exceptions that allow continuation

Whether the XML parser can continue processing after an exception event depends upon the value of the exception code.

The parser can continue processing if the exception code, which is in special register XML-CODE, is within one of the following ranges:

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

For definitions of the terms, see the related concept about XML input document encoding.

Table 1. XML PARSE exceptions that allow continuation
Exception code (decimal) Description Parser action on continuation
1 The parser found an invalid character while scanning white space outside element content.

For further information about white space, see the related concept about XML input document encoding.

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 The XML declaration was not at the beginning of the document. 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 actual 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 theexternal EBCDIC code page.
71 The actual 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 actual 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 actual 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 actual 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 actual 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 actual 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 819 (ISO-8859-1 Latin 1/Open Systems).
83 The actual 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 819 (ISO-8859-1 Latin 1/Open Systems).
84 The actual document encoding was ASCII but not valid UTF-8, the external code page specified UTF-8, and the document did not contain an encoding declaration. The parser uses UTF-8.
85 The actual document encoding was ASCII but not valid UTF-8, the external code page specified UTF-8, and the document encoding declaration specified neither a supported ASCII code page nor UTF-8. The parser uses UTF-8.
86 The actual document encoding was ASCII but not valid UTF-8, the external code page specified a supported ASCII code page, and the document encoding declaration specified UTF-8. The parser uses UTF-8.
87 The actual document encoding was ASCII but not valid UTF-8, and the external code page and the document encoding declaration both specified UTF-8. The parser uses UTF-8.
88 The actual document encoding was ASCII but not valid UTF-8, the external code page specified neither a supported ASCII code page nor UTF-8, and the document encoding declaration specified UTF-8. The parser uses UTF-8.
89 The actual document encoding was ASCII but not valid UTF-8, the external code page specified UTF-8, and the document encoding declaration specified a supported ASCII code page. The parser uses UTF-8.
92 The document data item was alphanumeric, but the actual document encoding was Unicode UTF-16. The parser uses code page 1200 (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  
XML-CODE  
XML input document encoding
  

related tasks  
Handling XML PARSE exceptions