XML Examples

XML parsing and handling is supported through SAX and DOM compliant APIs as well as streaming classes.

DOM Bookmarks Example

Provides a reader for XML Bookmark Exchange Language files

SAX Bookmarks Example

Demonstrates how to read XBEL files

QXmlStream Bookmarks Example

Demonstrates how to read and write to XBEL files

XML Stream Lint Example

A commandline tool reading from an input file and writing to the standard output file.


The XQuery/XPath and XML Schema engines in the Qt XML Patterns module provide classes for querying XML files and custom data models.

File System Example

Using Qt XML Patterns for querying non-XML data that is modeled to look like XML.

Recipes Example

Using Qt XML Patterns to query XML data loaded from a file.

XML Schema Validation Example

Using Qt XML Patterns to validate XML with a W3C XML Schema.

C++ Source Code Analyzer Example

Using XQuery and the xmlpatterns command line utility to query C++ source code.

Examples marked with an asterisk (*) are fully documented.

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.