[Interest] QtXml deprecated, should I rewrite code that uses QDomDocument?

Konstantin Tokarev annulen at yandex.ru
Fri Aug 9 14:33:42 CEST 2013



09.08.2013, 16:30, "Niels Dekker" <mymailfromqt at xs4all.nl>:
> In a few Qt4 based projects that I'm involved with, we use QDomDocument,
> from QtXml. Now with Qt5, QtXml is deprecated, and
> http://qt-project.org/doc/qt-5.1/qtxml/qtxml-index.html says about Qt
> XML: "The module is not actively maintained anymore. Please use the
> QXmlStreamReader and QXmlStreamWriter classes in Qt Core instead."
>
> So is it recommended for Qt users to rewrite code that uses
> QDomDocument, and replace it by code that uses QXmlStreamReader? It
> seems like a non-trivial task to me! (Please correct me if I'm wrong!)
>
> Is the intention to eventually remove the QtXml library from Qt framework?
>
> Are there other (technical) reasons for me to stop using QDomDocument?

It's hell slow. Use pugixml [1] instead, it's MUCH faster (even if compared with
QXmlStreamReader), and it's API is similar to QDom (both are DOM parsers).

[1] http://pugixml.org


-- 
Regards,
Konstantin



More information about the Interest mailing list