[Expat-discuss] parsing a stream of XML over a socket
benski at nullsoft.com
Sun Jun 4 18:34:50 CEST 2006
Parsing a stream chunks at a time works perfectly fine. Just make sure
you never pass a zero-sized chunk of data, as this indicates and
end-of-file to Expat.
Also, are you sure that your XML is valid?
> Hi All,
> I have just started trying to work with expat so that I can send out
> a stream of XML data over a socket so that a client can display the
> results. I have already written the server in java and am currently
> coding up a client in C which is where expat comes in. The problem I
> am having is that C reads the socket in chunks at a time and so when
> I pass a chunk to expat it will often throw an error. What is the
> best approach for this problem? Is there a way to tell expat to keep
> parsing a stream of XML? Is expat even the right parser to use?
> Any help is greatly appreciated.
> Ben Pirt
More information about the Expat-discuss