Skip to content

Introducing: AeonXML

by Xography on August 19th, 2010

For my current project I’m required to parse XML data, lots of it – so DOM is no option, because of its memory consumption. I’ve spent a few days searching the web for a suitable C++ SAX Parser and wasn’t able to find one to fit my needs: Lightweight, Object oriented, without a ton of dependencies.
I like PocoXML (expat based), but it is a bit bloated and requires the whole Poco library since it depends on the Poco Foundation. I also like ExpatMM, but this one requires expat as external library and is generally not polished enough to fit my demands.
So I’ve decided to assemble an expat C++ Wrapper inspired by both libraries on my own, and here it is: AeonXML, an object-oriented expat C++ Wrapper featuring a SAXParser, Exceptions, Interfaces, Adapters and a Handler implementation using STL. It is very alpha-ish at the moment and not that polished, but quite usable.

An absolutely unrepresentative benchmark, but it should give you the idea: Although using expensive string conversions and vector operations it is able to parse an old ~110 MB XML Test file in roughly 5 seconds, which equals around 20 MB/second (on my old E6600 Dual Core system). Using the raw char arrays speeds the process up, of course – but working with them is relatively ugly. It consumes less than 1 MB RAM during the whole process. You can also find the project over at GitHub.

No comments yet

Leave a Reply

Note: XHTML is allowed. Your email address will never be published.

Subscribe to this comment feed via RSS