Has anyone noticed any issues when attempting to parse large xml documents with the QXmlStreamReader. We are developing code that reads a stream of data off of a QTcpSocket. We attach the reader to the socket and walk over the content. At a certain point, when using a large data stream, we see errors dealing with the parsing.
After some digging it looks like the QXmlStreamReader class has an internal buffer of 8192. What we have been able to determine is that once the buffer fills up the reader begins to process that data. The problem seems to happen when the buffer size restriction causes data chopping where the final thing in the buffer might be something like
<tag attribute="value" /><tag attribute="va
Since the tag is not complete here a parser error happens. Does this mean that the streamed documents have to be under 8192? I figured the reader, since its an incremental parser, would have reported a premature end of document error where my ready read would have continued to stream in the rest of the data. This however, does not seem to happen.
The code I'm using is rather involved and for commercial use so I can't post any of it here, hence the no examples.
Bookmarks