开发者

Portably generate XML document without using a DOM

开发者 https://www.devze.com 2023-02-16 14:13 出处:网络
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 k

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++

0

精彩评论

暂无评论...
验证码 换一张
取 消