Your COBOL system supports a subset of the exception codes that are available via the XML-CODE special register. If one of these exceptions occurs, control is passed to the statement in the ON EXCEPTION phrase, or to the end of the XML PARSE or XML GENERATE statement if you did not code an ON EXCEPTION.
The following exception codes are dependent on the XMLPARSE(COMPAT) compiler directive being in effect when using XML PARSE.
Code | Description |
---|---|
1 | The parser found an invalid character while scanning white space outside element content. |
2 | The parser found an invalid start of a processing instruction, element, comment or document type declaration outside element content. |
3 | The parser found a duplicate attribute name. |
4 | The parser found the markup character '<' in an attribute value. |
5 | The start and end tag names of an element did not match. |
6 | The parser found an invalid character in element content. |
8 | The parser found in element content the CDATA closing character sequence '' without the matching opening character sequence ''. |
9 | The parser found an invalid character in a comment. |
10 | The parser found in a comment the character sequence '--' (dashdash) not followed by '>'. |
11 | The parser found an invalid character in a processing instruction data segment. |
12 | A processing instruction target name was 'xml' in lower-case, upper-case or mixed-case. |
13 | The parser found an invalid digit in a hexadecimal character reference (of the form �). |
14 | The parser found an invalid digit in a decimal character reference (of the form &#dddd;). |
15 | The encoding declaration value in the XML declaration did not begin with lower- or upper-case A through Z |
16 | A character reference did not refer to a legal XML character. |
17 | The parser found an invalid character in an entity reference name. |
18 | The parser found an invalid character in an attribute value. |
100 | The parser reached the end of the document while scanning the start of the XML declaration. |
101 | The parser reached the end of the document while looking for the end of the XML declaration. |
102 | The parser reached the end of the document while looking for the root element. |
103 | The parser reached the end of the document while looking for the version information in the XML declaration. |
104 | The parser reached the end of the document while looking for the version information value in the XML declaration. |
106 | The parser reached the end of the document while looking for the encoding declaration value in the XML declaration. |
108 | The parser reached the end of the document while looking for the standalone declaration value in the XML declaration. |
109 | The parser reached the end of the document while scanning an attribute name. |
110 | The parser reached the end of the document while scanning an attribute value. |
111 | The parser reached the end of the document while scanning a character reference or entity reference in an attribute value. |
112 | The parser reached the end of the document while scanning an empty element tag. |
113 | The parser reached the end of the document while scanning the root element name. |
114 | The parser reached the end of the document while scanning an element name. |
115 | The parser reached the end of the document while scanning character data in element content. |
116 |