I'm struggling to put some order in my mind about SAX/DOM integration with Java. I find the information over the Internet messy. I would appreciate if someone could answer some, probably knives, simple questions. Here's my environment:
My Questions
org.xml.sax.driver system property was set, XMLReaderFactory.createXMLReader() method still returns an object com.sun.org.apache.xerces.internal.parsers.SAXParser. Where does it come from?The version of the (default) Xerces parsers you have in your JVM depends on the Java build you are using. As you can see from https://bugs.openjdk.org/browse/JDK-8282280, the OpenJDK team will (if necessary) pull in an updated Xerces version into the OpenJDK code tree ... and backport the change to supported versions of Java.
There is an article in the Oracle Knowledgebase on how find out what a JVM's Xerces version is, but you need an Oracle Support account to read it:
Apparently on Java 8 you can find this out by running:
$ java com.sun.org.apache.xerces.internal.impl.Version
... but this doesn't work in later versions. (Perhaps, someone can comment to supply the new recipe?)
This Q&A is also relevant, but I don't think it answers the "what version" question for a JVM's builtin Xerces implementation:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With