You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Miguel A Paraz <ma...@free.net.ph> on 2002/04/28 11:05:03 UTC

non-blocking XML Pull Parser

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?

> 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!


-- 
Miguel A Paraz             <mp...@mparaz.com>	Mobile: +63-916-423-7922
Imperium Technology, Inc.  <ma...@imperium.ph>	Office: +63-2-812-3155


---------------------------------------------------------------------
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


Re: non-blocking XML Pull Parser

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
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:
http://www.extreme.indiana.edu/xgws/xsoap/xpp/download/PullParser2/doc/faq.html
(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

thanks,

alek



---------------------------------------------------------------------
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