O'Reilly logo

An Introduction to Design Patterns in C++ with Qt 4 by Paul Ezust, Alan Ezust

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

Chapter 14. Parsing XML

This chapter introduces two ways of parsing XML data, available from Qt’s XML module. We demonstrate event-driven parsing with SAX, the Simple API for XML, and tree-style parsing with DOM, the Document Object Model.

14.1

The Qt XML Module

325

14.2

Event-Driven Parsing

325

14.3

XML, Tree Structures, and DOM

329

XML is an acronym for eXtensible Markup Language. It is a markup language similar to HTML (HyperText Markup Language), but with stricter syntax and no semantics (i.e., no meanings associated with the tags).

XML’s stricter syntax is in strong contrast to HTML. For example:

  • Each XML <tag> must have a closing </tag>, or be self-closing, like this: <br/>.

  • XML tags are case sensitive: <tag> is not the same as <Tag>.

  • Characters such ...

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