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.ConditionCosminexus XML Processor operations
In version 06-00In version 07-00 and later versions
1When a parser uses the InputSource object to read a byte streamAutomatically detects the character encoding by using the algorithm of the XML specifications.The encoding specified in the setEncoding method takes precedence.
2If 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.
3If you specify an empty string for the uri or systemId argument of the parse methodIOException occurs.SAXException occurs.
4If you specify an empty string for the system identifier of the DOCTYPE declaration in the XML documentIOException occurs.SAXException occurs.
5If an element that was declared EMPTY in the DTD contains comments onlyAn error does not occur when checking validation.An error occurs during validation.
6If 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.
7If an element that was not defined in the child element is specified during validation by DTDThe KECX01165-E error is reported.The KECX01164-E error is reported.
8If UTF-16 is specified as the encoding attribute value of the XML declaration in an XML document coded in UTF-8The KECX01083-E error is reported.The KECX01024-E error is reported.