/Nigel Kibble/:
My question is, when I implement the code (shown below) with
XercesImpl.Jar in my classpath, am I using the Xerces SAXParser (from
the .jar) or am I using SAXParser supplied in the JDK?
Note you need both "xml-apis.jar" and "xercesImpl.jar" in your
classpath. Read the 'SAXParserFactory.newInstance()' documentation:
http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()
to find how the JAXP implementation plugging facility works. The
"xercesImpl.jar" has
"META-INF/services/javax.xml.parsers.SAXParserFactory" included
which directs the SAXParserFactory instance to be created of type
'org.apache.xerces.jaxp.SAXParserFactoryImpl' which then creates
Xerces implemented parsers - there's no need to use the "endorsed"
directory to override system classes, just put the two Xerces JARs
on the classpath.
On the other hand if you want to use the DOM Level 3 interfaces
provided by Xerces you'll need to put at least the "xml-apis.jar" in
the "endorsed" libraries, at least for compilation - I'm not sure if
one would need it run-time.
--
Stanimir
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]