ruwired <christopher....@citi.com> wrote on 01/22/2009 10:21:23 AM:

> Hmm...I see.
>
> The guy who gave this project to me is misinformed. I was told Xalan
itself
> is a parser but apparently it's not. I was also told Xerces is the parser
> recommended as a replacement for Xalan in Java 1.5. That is apparently
wrong
> too since Xerces is the replacement for Crimson. Correct me if I'm wrong.

That's right. Xerces is an XML parser. Xalan is an XSLT processor. Sun Java
5 includes derivatives of these.

> The point of this whole thing was to see if Xerces would cut down on the
> time it takes to process a 500mb XML file and pass through about 13 XSLs.
> What would be the optimal way (if there is one) to do this if I'm not
using
> Xalan?

If the transformation is simple you could roll your own, perhaps by writing
a SAX ContentHandler which does the work. I imagine your scenario isn't
simple though.

> In any case, now I don't see what the point is of removing Xalan from the
> equation and just using Xerces. It seems like all I would be doing is
> removing the ability to do XSL transforms in a simplified way. Doesn't
Xalan
> use the Xerces implementation by default as the parser?

It uses whatever parser it finds through JAXP's factory mechanism. The
default will often be Xerces.

> Michael Glavassevich-3 wrote:
> >
> > Most XSLT processors bulid some data model of the document regardless
of
> > the form of the input. So even if you fire SAX events to the XSLT
> > processor
> > I would expect that you would still run out of memory for very large
> > documents.
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrgla...@ca.ibm.com
> > E-mail: mrgla...@apache.org
> >
>
> --
> View this message in context: http://www.nabble.com/Parsing-a-large-
> XML-file-in-Xerces-tp21572644p21606335.html
> Sent from the Xerces - J - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
> For additional commands, e-mail: j-dev-h...@xerces.apache.org

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrgla...@ca.ibm.com
E-mail: mrgla...@apache.org

Reply via email to