When I needed to do a lot of XML parsing and manipulation, I found I was commonly doing a bunch of relatively basic things and needing to do a lot of set-up to use the XercesC library to do them. What I really wanted was a set of wrappers around the XercesC functionality that'd make it easy to do the common stuff, while still giving me the ability to get down to the raw APIs if I really needed to. So, these routines were born. Note that this library doesn't eliminate the need to understand at least the basics of the XercesC API and classes.
The XmlDOMUtil namespace came first, with routines to parse XML documents into a DOM tree and do common operations on that tree. Later I added routines to create nodes, build trees and serialize them back into text form. Not much to say here, it's a fairly straightforward wrapper around the equivalent XercesC functions that lets you use standard C++ strings, character pointers and the like instead of XercesC Unicode strings.
The XmlSAXUtil namespace came later when, for a personal project, I needed something more memory-efficient. XmlSAXElementHandler objects encapsulate the handler code for a particular XML element during parsing. XmlSAXHandler is a XercesC handler class that you can configure with a map of element names and pointers to element handler objects. When the parser hits an element you've configured, it calls your element handler with the information about that occurrence of the element (technically, it calls your handler during endElement() processing). There's also an XmlSAXUserData class. You can attach an object derived from that class to the XmlSAXHandler object and a pointer to it'll be passed to your XmlSAXElementHandler routines. XmlSAXHandler also calls Reset() and Done() methods on the user data object at the start and end of processing of an XML document, so you can do your own setup and finalization conveniently.
The XmlUtil namespace got created to hold some common stuff needed by both the DOM and SAX routines, like the base Exception class and a class to help converting between XercesC Unicode strings and standard C++ strings.
One asymmetric bit: the only way to create XML documents is using the DOM functions. The SAX functions are for parsing only. If you think about it, it pretty much has to be that way. SAX is based on doing call-backs during parsing, you can't sensibly do that except while parsing a document. So be prepared to work with the DOM functions even if you're using SAX for parsing.
This code is licensed under the terms of the GPL v3, a copy of which you can find attached to this page.