I have a need to generate XML documents from C++. For reasons of performance I don't want to use an XML parser such as Xerces, or TinyXML and generate a DOM which I then serialize, ideally I want a kind of "reverse SAX" interface. I also need the code to be really portable, across Windows, UNIX, MacOSX etc.
The only reference so far I've fou开发者_开发问答nd is to genx. Anyone got any other suggestions?
EDIT: This question what's the easiest way to generate xml in c++? actually seems to answer mine, or at least provides some links to other XML generating libraries.
Rapidxml is very fast and pretty lightweight.
Looks like libxml2 has a streaming API. See answer to question create and stream large XML document in C++
精彩评论