Re: Does XMLpull pulls charactors from stream ?

Aleksander Slominski <[email protected]> Thu, 08 May 2003 01:40:12 -0500
Newsgroups gmane.text.xml.xmlpull.devel
Message-ID <[email protected]>
Susantha Kumara wrote:

>Hi all,
>
>I have few questions about the XMLPull parser (may be
>I expected this feature too in XMLPull C++ parser)
>
>1. Does the XMLPull parser pulls charactors from the
>stream provided with setInput(..). I mean if there is
>no enough input available to generate an event does
>the parser request the stream ?.
>
>Note:- 
>Xerces parsers (DOM, SAX and SAX2) are pushed (given)
>a full stream (eg: char* buffer or file) before it
>starts parsing.
>
>
>    start
>(next() called)
>      |
>      v
>Request stream  <-----------------------|
>for more chars                          |
>      |                                 | 
>      v                                 |
>Got more chars ? ----No---> Error       |
>      |                     No data     |
>     Yes                    in stream   |
>      |                                 |
>      v                                 |
>Is there enough                         |
>chars to generate ----------No----------|
>a content event ?
>      |
>     Yes
>      |
>      v
>Generate a content
>handler event
>      |
>      |
>      v
>    return
>(wait till next()
>is called)
>
>May be the Java streams support this feature
>automatically (I am not good at Java). I need a C++
>pull parser that works like this.
>
>Any idea ?
>  
>
hi,

this is exactly how it works. i have added simple abstraction that works 
like java InputStream: you can request bytes from input and it will 
block until byte is read or there is error (such as timeout) when 
reading from socket.

i am wrapping now C++ version pf XPP3 so it passes some first unti 
tests. as soon as i have it i wills send it to you .

thanks,

alek



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/uetFAA/2U_rlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/