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.
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:
<tag> must have a closing
</tag>, or be self-closing, like this:
XML tags are case sensitive:
<tag> is not the same as
Characters such ...