ok thanks.  I was just curious since it seemed that even if I just wanted to
use the DOM parser, I had to include classes from org.xml.sax.  I wanted to
know if maybe it would be better for some of these (like InputSource,
ErrorHandler, etc...) should be in org.apache.xerces so that it was more
obvious that they are general classes instead of part of the actual SAX
implementation.

- Greg

-----Original Message-----
From: Andy Clark [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 10, 2000 1:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [Xerces-J] architecture question


Gregory Krasnow wrote:
> Since it seems like many of the classes one needs to use regardless 
> of parser come form org.xml.sax, am I correct in assuming that 
> Xerces is basically a SAX parser that has implemented a DOM tree 
> from the SAX parser??

If you look at the code, you'll notice that we created an internal
kind of "super SAX" which passes through all of the relevant info
as it's encountered in the document. From these internal callbacks
we call the SAX handlers (in the SAX parser) and build a DOM
Document (in the DOM parser). But the parser is not strictly a
SAX parser as defined by the handler interfaces defined in SAX.

-- 
Andy Clark * IBM, JTC - Silicon Valley * [EMAIL PROTECTED]

Reply via email to