[Qt-interest] How to: parse an xml file with tags
Ross Driedger
ross at earz.ca
Tue Feb 16 21:31:30 CET 2010
On 16-Feb-10, at 2:19 PM, qt-interest-request at trolltech.com wrote:
> Message: 3
> Date: Tue, 16 Feb 2010 19:36:29 +0100
> From: Thiago Macieira <thiago at kde.org>
> Subject: Re: [Qt-interest] How to: parse an xml file with tags
> To: qt-interest at trolltech.com
> Message-ID: <201002161936.37018.thiago at kde.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Em Ter?a-feira 16. Fevereiro 2010, ?s 14.33.17, Scott Aron Bloom
> escreveu:
>> Ive been told this by Thiago on IRC multiple times... QXmlReader/
>> Writer are the future, QDom is being depricated and no longer worked
>> on..
>>
>> Ill leave it to him to discus the reasons and virtues of the move..
>
> Correct.
>
> QDom* classes are memory hungry and inefficient. They need the
> entire document
> ready, then they parse it fully, before you can do anything. Sure,
> it's
> convenient.
I took a break just to calm down a bit. This news is NOT good and I
was very angry when I first read it. I know that I am not the only
one who feels that this is a huge mistake. At best, this could be
called an ill considered decision. Yes, DOM is memory hungry, but any
implementation is and is not suitable to large files. This is about
the second thing that i taught to anyone learning SAX and DOM. If you
are using large files, DOM is not a good choice.
There are some very compelling reasons to continue supporting DOM:
1) It is a W3C standard model. To discontinue support for is this is
highly presumptuous.
2) There is a substantial code base that uses it. I have invested a
good deal of time converting my code from xerces to Qt and them
extending it. Can I invoice Nokia for the time and effort it will
take to convert my code into some other proprietary XML model? I
didn't think so.
3) For my purposes, the abstraction that DOM provides makes a whole
lot of sense.
The more I think about this the angrier I get, considering that DOM
support is one reason I chose Qt as my framework and that changing the
implementation to suit something else will likely represent many
month's work.
...and I don't think Nokia will pay my invoice to convert my code...
Ross Driedger
ross_at_earz.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100216/299327b6/attachment.html
More information about the Qt-interest-old
mailing list