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
   xmlParserInputBufferCreateIO()

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

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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