TinyXML-2 Logo

TinyXML-2

TinyXML-2 is a simple, small, efficient, C++ XML parser that can be easily integrating into other programs.

TinyXML-1 served my needs for many years; but it uses memory inefficiently, and doesn't perform as well as desired for mobile devices. I wanted an XML parser that was a little more modern, a little simpler (the "tiny" had been lost a little over the years), and was a good fit for Android.

This led to TinyXML-2.

Online Documentation: general information and an API reference.

TinyXML-2 is available on github, where you can send feedback, get source, share, and submit changes. (You can download the source as a zip using the "Download ZIP" button on the right side.)

TinyXML-1 or TinyXML-2?

Both parsers:

  1. Simple to use with similar APIs.
  2. DOM based parser.
  3. UTF-8 Unicode support. http://en.wikipedia.org/wiki/UTF-8

Advantages of TinyXML-2

  1. The focus of all future dev.
  2. Many fewer memory allocation (1/10th to 1/100th), uses less memory (about 40% of TinyXML-1), and faster (~5x on read).
  3. No STL requirement.
  4. More modern C++, including a proper namespace.
  5. Proper and useful handling of whitespace

Advantages of TinyXML-1

  1. Can report the location of parsing errors.
  2. Support for some C++ STL conventions: streams and strings
  3. Very mature and well debugged code base.

Thanks for your interest in TinyXML - I hope it is a great parser for your needs.

And thanks to John Mackay for the logo!