Tom Quarendon
Tom Quarendon

Reputation: 5716

Portably generate XML document without using a DOM

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 found 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.

Upvotes: 0

Views: 170

Answers (2)

Tom Quarendon
Tom Quarendon

Reputation: 5716

Looks like libxml2 has a streaming API. See answer to question create and stream large XML document in C++

Upvotes: 0

Jay
Jay

Reputation: 14481

Rapidxml is very fast and pretty lightweight.

Upvotes: 1

Related Questions