views:

326

answers:

2

There are several comparisons of the different java xml data binding tools online. I'd like to see this become a useful comparison between the different c++ tools for xml data binding.

Which tool are you using for xml data binding in c++ ? CodeSynthesis and xmlbeanscxx are a couple of the available choices.

I'd like everyone to add information below about their experience with this technology including reasoning to choose one tool over another, ease of use, and performance. Also feel free to add technical information regarding namespace support, parsing options(tree/streaming), etc.


CodeSynthesis

(Feel free to add Information Here)


xmlbeanscxx

(Feel free to add Information Here)


Boost Serialization Library

(Feel free to add Information Here)

+1  A: 

Boost Serialization Library Boost, don't leave home without it.

ceretullis
A: 

You should try free XmlPlus xsd2cpp tool, for XML Schema to C++ Data Binding.
XmlPlus xsd2cpp

The xsd2cpp binary when invoked on an [input].xsd, generates:
* the C++ sources(implementation/headers) for the supplied XML-Schema
* a main.cpp template, to demonstrate how generated sources can be consumed
* the automake/autoconf files for building the generated source

The main.cpp file is built into a [input]run binary for an [input].xsd input, which can be used to:
- generate sample xml documents, without any additional C++ code
- validate an instance xml document against the Schema: [input].xsd
- generate populated instance xml document, if you write code in the template function inside main.cpp to populate the Document.
- option to roundtrip ie. read and instance xml file into C++ structures, and then write back to xml

A brief note on XmlPlus xsd2cpp:
* provides C++ Data-Binding, validating-parser, writer for xml-files constrained by the supplied XML-schema * roundtrip retains comments and processing instructions
* contains good examples to demonstrate usage
* tested against some of randomly selected W3C test cases

Satya Prakash Tripathi