Re: [xml] libxml socket stream
- From: aliban gmx net
- To: xml gnome org
- Subject: Re: [xml] libxml socket stream
- Date: Sun, 12 Oct 2003 13:29:43 +0200
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
xmlParserInputBufferPush()
each time my socket recvs data and reader is not working... if reader
is
currently working data will waiting in socket and get fetched later..
the reader will read data until there come an error by an unfinished
tag
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
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]