O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

XML streams

XML has become one of the most popular standards that is used to store hierarchical data. Despite its verbosity and difficulty to read by human eye, it is used in virtually any domain where data persistency is required, as it is very easy to read by machines. Qt provides support for reading and writing XML documents in two modules:

  • The Qt Xml module provides access using the Document Object Model (DOM) standard with classes such as QDomDocument, QDomElement, and others
  • The Qt Core module contains QXmlStreamReader and QXmlStreamWriter classes that implement streaming API

One of the downsides of QDomDocument is that it requires us to load the whole XML tree into the memory before parsing it. Additionally, Qt Xml is not actively ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required