views:

293

answers:

6

We have XML files and we want to have C++ classes generated out of XML schema like we have it in .NET xsd.

Also the generated classes instance needs to provide appropriate XML by calling some methods.

+1  A: 

Gslgen is known to be a good code generator. It uses a simplified version of XML though.

Hassan Syed
+1  A: 

I use Liquid XML Studio, it does all of that as well as documenting everything

Liquid is nice, but the code-gen is a premium feature - have to pay for it
George
+2  A: 

CodeSynthesis XSD is an open-source (GPLv2 + proprietary license), cross-platform XML Schema to C++ compiler. Check it out.

Boris Kolpackov
A: 

If you are working with Web Services here, then I would really suggest going with gSOAP.

If you are only interested in data bindings in C++, then XSD: XML Data Binding for C++ by code synthesis is also a very good tool, they are pretty good about documentation too.

Gollum
A: 

If you want a free C++ tool, check out this one: http://sourceforge.net/projects/xmlplus/

Satya Prakash Tripathi