uCosminexus Application Server, XML Processor User Guide

[Contents][Glossary][Index][Back][Next]

Appendix A.1 Differences in Behaviors Between DOM and SAX Parser Versions

The following table describes the differences in behaviors between DOM and SAX parser versions.

Table A-1 Differences in behaviors between DOM and SAX parser versions

No. Condition Cosminexus XML Processor operations
In version 06-00 In version 07-00 and later versions
1 When a parser uses the InputSource object to read a byte stream Automatically detects the character encoding by using the algorithm of the XML specifications. The encoding specified in the setEncoding method takes precedence.
2 If parsing is performed with incorrect encoding (for example an XML document saved in EUC but for which encoding is not specified in the XML declaration) IOException occurs. SAXException occurs.
3 If you specify an empty string for the uri or systemId argument of the parse method IOException occurs. SAXException occurs.
4 If you specify an empty string for the system identifier of the DOCTYPE declaration in the XML document IOException occurs. SAXException occurs.
5 If an element that was declared EMPTY in the DTD contains comments only An error does not occur when checking validation. An error occurs during validation.
6 If an XML document that cannot be specified in attribute values or text, including U+D800 to U+DFFF, is parsed (however, this does not include surrogate pairs) An error occurs.

In J2SE 5.0
An error occurs.

In Java SE 6
Normal termination.
However, take note that the processing result becomes invalid.
7 If an element that was not defined in the child element is specified during validation by DTD The KECX01165-E error is reported. The KECX01164-E error is reported.
8 If UTF-16 is specified as the encoding attribute value of the XML declaration in an XML document coded in UTF-8 The KECX01083-E error is reported. The KECX01024-E error is reported.