axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James M Snell" <>
Subject Xerces Pull Parser Interface
Date Sat, 24 Mar 2001 21:16:24 GMT

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 

With Sax, you basically do: 

        SomeSAXParser sax = new SomeSaxParser(input_xml, content_handler);

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 

With the Xerces pull parser, to do the same thing, you would do:

        SomePullParser pull = new SomePullParser(input_xml, 
        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 (online) (offline)

View raw message