For my purposes, PugiXML did a great job
http://pugixml.org/
The reason I thought it was so nice was because it was just 3 files, the configuration header, the header and the actual source.
But, as you stated, you are not interested in parsing, so why even use a special class to write out XML? Although your classes may be too complicated for this, I found the easy task of using std::ostream and just std::ostream out standard compatible XML this way. For example, let's say I have a class representing Company , which is a collection of Employee objects, just create a method in each Company and Employee class that looks something like the following psuedocode
Company::writeXML(std::ostream& out){ out << "<company>" << std::endl; BOOST_FOREACH(Employee e, employees){ e.writeXML(out); } out << "</company>" << std::endl; }
and to make it even easier, your Employee writeXML function can be declared virtual so that you can have a specific output, for example, CEO , President , Janitor or whatever should be subclassed.
Bob
source share