Re: [xml] libxml socket stream

ok, sorry. here again.

ok, i thought about it.

i would like to do it like this:
as the xmlParserInputBufferCreateIO() is limited to a special maximum
amount of readers at one time (15) i would use 
each time my socket recvs data and reader is not working... if reader 
currently working data will waiting in socket and get fetched later..

the reader will read data until there come an error by an unfinished 
for example or the last node was done successfully...

whatever the hope is that the reader will stay at the same position 
as befor the error/last success happened. thus i can simply 
xmlParserInputBufferPush() the missing but finally recvd data and 
continue reading. reader would then do the error node again and 
everything would be fine.
well, do you think this would work?

On 12 Oct 2003 at 6:19, Daniel Veillard wrote:

On Sun, Oct 12, 2003 at 01:48:31AM +0200, aliban gmx net wrote:
hi. over a socket stream i receive a document. the document is 
big and might need houres to get transmitted. i think xmlreader 
be used for this.

my problem is this. as i want to parse "on the flow" i have to 
any received buffer to the reader. whatever it can occure that a 
is not transferred in one socket receive call therefor the reader
might receive a string that is not xml- finsihed.

  if you need dedicated I/O processing then build your custom
input layer with

I also need to know, can it happen that reader is currently 
(and using readers buffer) while new data is recv over the socket 
the socket would try to append the data to the readers buffer 
reader is using it...

how to suspend the reader?

  Well you can't, the programming model of the reader is precisely
that the part of the code which does the scanning is the one 
the processing flow. If you want something callback based, then use 


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search 

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]