Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A C++ code generator from an XML spec [closed]

Tags:

c++

xml

I'd like to know if there's a tool which allows you to do class definition based on an XML format. I'm not looking for data binding. Anyone can help ?

Thanks

like image 606
lollancf37 Avatar asked Aug 22 '09 16:08

lollancf37


2 Answers

When I had this problem a few years back, I wrote a Python tool to execute Python code embedded in text files so that I could generate C++ code with Python inside the C++: http://nedbatchelder.com/code/cog/

like image 191
Ned Batchelder Avatar answered Oct 10 '22 04:10

Ned Batchelder


I know of two tools both of them are commercial products

http://www.codesynthesis.com/products/xsd/

  • Is open source GPL - commercial licence is avalable for commercial use
  • I think this is/was used by gSOAP
  • http://www.artima.com/cppsource/xml_data_binding.html

http://www.codalogic.com/lmx/

  • don't know any more than the web site

I hope this helps.

Update:

Just found this http://en.wikipedia.org/wiki/XML_data_binding#C.2B.2B

Update 2:

This is great, I have been looking for an open source package to do this for ages and your question has just helped my find it:

http://top.touk.pl/confluence/display/xmlbeansxxdoc/Introduction+to+xmlbeansxx http://top.touk.pl/confluence/download/attachments/458767/Manipulate_XML_Documents_in_CPP_with_xmlbeansxx.pdf

like image 36
iain Avatar answered Oct 10 '22 04:10

iain