You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ted Leung <tw...@sauria.com> on 2001/04/12 21:01:22 UTC

Re: Xerces Pull Parser Interface

James,

What ever happened to the details on this -- did I miss it?

Thanks,
Ted
----- Original Message -----
From: "James M Snell" <ja...@us.ibm.com>
To: <ax...@xml.apache.org>
Sent: Monday, March 26, 2001 10:11 PM
Subject: Re: Xerces Pull Parser Interface


> Ted,
>
> I'll have more on this in a day or so.  I'm waiting to get the updated
> sources back from the XPP author and I'll write up something that details
> the differences.
>
> One key point to make here is that we're not trying to get rid of SAX
> altogether, there are many use cases where SAX will come in very very
> handy.  What we are wanting to do is augment Sax with a very low level,
> high performance pull parser to do the types of things that would be
> difficult to do with Sax.  Again, I'll have more details on this in a day
> or so.
>
> - James Snell
>      Software Engineer, Emerging Technologies, IBM
>      jasnell@us.ibm.com (online)
>      jsnell@lemoorenet.com (offline)
>
> Please respond to axis-dev@xml.apache.org
> To:     <ax...@xml.apache.org>
> cc:
> Subject:        Re: Xerces Pull Parser Interface
>
>
>
> How does what we have compare w/ XMLPP, or even better, an
> ideal API.  As I recall, you were trying to persuade the XMLPP author
> to put in some kind of SAX compatibility layer or such.  How would
> that differ from what's in X1?
>
> Ted
> ----- Original Message -----
> From: "James M Snell" <ja...@us.ibm.com>
> To: <ax...@xml.apache.org>
> Sent: Saturday, March 24, 2001 1:16 PM
> Subject: Xerces Pull Parser Interface
>
>
> > Ok,
> >
> > I've been doing some experimentation with the Xerces Pull Parser
> > interface.  It's pretty interesting and we could probably use it but
> we'd
> > have a lot of the same problems with it that we would have if we went
> with
> > just Sax.  The reason for that is that the "Pull-Parser" is pretty much
> > nothing more than a Sax Parser that pauses between each XML element it
> > finds.
> >
> > With Sax, you basically do:
> >
> >         SomeSAXParser sax = new SomeSaxParser(input_xml,
> content_handler);
> >         sax.parse();
> >
> > In which case the "parse" method rips through the XML doc firing off
> > events on the content_handler for each of the individual parts of the
> > document.
> >
> > With the Xerces pull parser, to do the same thing, you would do:
> >
> >         SomePullParser pull = new SomePullParser(input_xml,
> > content_handler);
> >         while (sax.parseSome()) {}
> >
> > The parseSome method scans the XML document until it hits some
> significant
> > item (like an element) and it fires off the appropriate event to the
> > content_handler and stops until you call the parseSome method again.
> >
> > I'm looking into how this can be used for the Axis Message API.  Any and
> > all feedback would be appreciated.
> >
> > - James Snell
> >      Software Engineer, Emerging Technologies, IBM
> >      jasnell@us.ibm.com (online)
> >      jsnell@lemoorenet.com (offline)
> >
>
>
>