You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Tech Rams <te...@yahoo.com> on 2005/07/31 22:24:30 UTC

RE: Question about SAX & Xerces

JDK 1.5 has xerces built-in, though under a different
package name (com.sun.org.apache.xerces.internal).

Look at
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()
to know how factory implementation is found. The
default implementation is the one that comes with JDK
1.5, that is xerces.



-----Original Message-----
From: Brecht Rijmaekers
[mailto:brecht.rijmaekers@gmail.com] 
Sent: Saturday, July 30, 2005 1:42 PM
To: j-users@xerces.apache.org
Subject: Question about SAX & Xerces

Hello all,

I'm aware this is probably a stupid question, but I
really couldn't
find an answer in the documentation and the archive of
this
mailinglist. I'm fairly new to XML and Xerces, so
excuse me for my
stupidity :)

How does the Java Runtime Environment know that he has
to use the
Xerces implementation in the example given on
http://xml.apache.org/xerces2-j/faq-sax.html? I tried
that example (I
implemented my own handler, derived from
DefaultHandler), which worked
perfect, however I did *not* add the xerces library to
my classpath.
Is xerces already distributed in the standard JDK 1.5
library? If you
look at the imports above, the xerces package is never
imported, so I
assume the classes are created dynamically.

Thanks a lot. Kind regards,

--
Brecht

---------------------------------------------------------------------
To unsubscribe, e-mail:
j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail:
j-users-help@xerces.apache.org


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: Question about SAX & Xerces

Posted by Elliotte Rusty Harold <el...@metalab.unc.edu>.
Tech Rams wrote:
> JDK 1.5 has xerces built-in, though under a different
> package name (com.sun.org.apache.xerces.internal).
>
> Look at
> http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/parsers/SAXParserFactory.html#newInstance()
> to know how factory implementation is found. The
> default implementation is the one that comes with JDK
> 1.5, that is xerces.
>   

Please don't. SAXParserFactory is a disaster waiting to happen, If you 
use it, you'll only find yourself back here in a week pleading for help 
with undiagnosable bugs. It was designed for SAX1. In 2005 nobody should 
be using SAX1, SAXParser, or SAXParserFactory. Use XMLReader and 
XMLReaderFactory instead.

--

Elliotte Rusty Harold

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org