[Interest] json file handling

Andreas Pakulat apaku at gmx.de
Wed Apr 15 20:12:14 CEST 2015


Hi,

Am Mittwoch, 15. April 2015 schrieb Andre Somers :

> On 15-4-2015 17:25, Thiago Macieira wrote:
> > On Wednesday 15 April 2015 16:36:15 André Somers wrote:
> > As for XML, the format may not be suitable but QXmlStreamWriter is since
> it
> > keeps the state of which tags it needs to close and allows you to simply
> > stream data into it. On the receiver side, QXmlStreamReader is capable of
> > receiving incomplete data and making the best it can with what has been
> > completed.
> I'd expect a log-file like output to be well defined at any moment in
> time, or as close as possible to that. So, while QXmlStreamWriter is
> suitable, it does not produce a valid XML file until you finalize the
> write. That may not be what you want (even though QXmlStreamReader could
> be used to parse the incomplete file*).


Any SAX2 parser I've seen produces events while reading the input without
waiting for the document to be valid. Its true that they usually throw an
error when the input ends but the tags are not closed but in this case one
could simply ignore such an error.

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150415/a3ee5ea2/attachment.html>


More information about the Interest mailing list