Details
Description
Currently, Castor XML never uses JAXP to instantiate an XML parser, but always creates an instance of Xerces (as defined by the value of the org.exolab.castor.parser property). With this property set, Castor XML will not use JAXP, but use Class.forName() to instantiate a XML parser instance.
Whilst this works in principle, this creates problems for users on different JDKs, as the class name for the Xerces parser is different on Java 5 from what it used to be with Java 1.4 and earlier.
The solution is to comment out this property (and make it clear that it can be used to override the default JAXP mechanisms), and to rely on JAXP for XML parser instantiation. This has the benefit that this will work out of the box for both JDK 1.4 and JDK 5.0 (and higher) without any properties to be changed in custom castor.properties files.
Issue Links
- is depended upon by
-
CASTOR-2168
Switch to using XML APIs to interface to SAX parsers
-
A possible solution will have to touch the default castor.properties file, and the following classes:
a) org.exolab.castor.xml.Configuration
b) org.exolab.castor.xml.LocalConfiguration
to refactor some of the code duplication.