Re: [xml] libxml socket stream

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 very 
big and might need houres to get transmitted. i think xmlreader 
should be used for this.

my problem is this. as i want to parse "on the flow" i have to pass 
any received buffer to the reader. whatever it can occure that a node 
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 working 
(and using readers buffer) while new data is recv over the socket - 
the socket would try to append the data to the readers buffer while 
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 controlling
the processing flow. If you want something callback based, then use SAX,


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

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