"Diethelm Guallar, Gonzalo" wrote:
> 
> I have been looking into using xerces to parse an XML file
> with the description of a menu and generate JavaScript code
> that implements that menu. Anyway, there seem to be several
> parsers in xerces (1.1.3):
> 
>   DOMParser
>   RevalidatingDOMParser
>   SAXParser
> 
> I based my code on SAXParser, and when I compile I get lots
> of "deprecated" messages. Questions:
> 
> 0. What are the differences between those parsers?
> 1. Is there a "preferred" parser to use?
> 2. If the preferred parser is SAX, how do I get rid of the
>    deprecated messages?
> 3. The original code I hacked had an option to specify the
>    parser class, and it uses a factory to create the class
>    instance, so it seems these things are plugable. The
>    problem is, if I just put the xerces jar in WEB-INF/lib,
>    the parser class is not found at run-time. The only
>    solution I found for this was moving the xerces jar to
>    $TOMCAT/lib. Is this a known problem? Is this related to
>    those things called "Class Loaders"? Can I just use a
>    fixed parser implementation (hopefully the "preferred"
>    one) to avoid this problem?

Gonzalo, there is no "preferred" parser (except maybe JDOM ;).
You probably implemented SAX1 callbacks using Xerces, which has been
deprecated in favor of SAX2 (Xerces supports both).  SAX is much
faster--and uses less memory--than DOM, but provides read-only access to
the data (i.e. you can't manipulate the XML tree directly).
-- 

Daniel Rall <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to