xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksander Slominski <as...@cs.indiana.edu>
Subject Re: non-blocking XML Pull Parser
Date Sun, 28 Apr 2002 15:24:17 GMT
Miguel A Paraz wrote:

> On Sun, Apr 28, 2002 at 01:11:31AM -0500, Aleksander Slominski wrote:
> > i have written also driver for my XPP2 parser
> > that uses Xerces 2 XNI to  implement easy to use XML Pull Parser, see:
> > http://www.extreme.indiana.edu/xgws/xsoap/xpp/
> > so i can can attest that it is not too hard to use
> > Xerces 2 XNI pull parsing configuration ...
> I am trying this out now.
> Can we add an option for the XPP next() method to check first if the Reader
> still has something to read, (InputStreamReader.ready() ? )and if not, inform
> the client instead of waiting for input?

this can be easily done in Java on the level when you create input, see:
(described solution that worked for reading incrementally XML data directly from socket)

in XMLPULL API (implemented in XPP3) we have added method
setInput(InputStream in, String inputEncoding) to make even easier
passing raw byte input stream to the pull parser.

> > creation of extra parsing thread is not possible on J2EE platform where
> > EJB application server controls threading - see for example discussion
> > of this issue on axis-dev mailing list (they settled for the first version to
> > not use extra thread with SAX because of those problems).
> > IMHO it is simply wasteful to have extra thread created for each parsing ...
> This is also why I'd like to have non-blocking parsing, without having to
> thread.  Thanks for your inputs!

it is unfortunate that pull API never gain that much acceptance as push API
with SAX, see: http://www.extreme.indiana.edu/xgws/#TR_XPP



In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org

View raw message