JAXB equivalent for generating c++ classes from xsd?

别来无恙 提交于 2019-12-24 10:01:37

问题


JAXB provides a very OOP way for handling xml data, is there any such alternative or script avaiable for c++. Looking for some tool which is OS independent ie: should work in linux, windows, etc.

Tool should be generating c++ classes like the way JAXB generated from XSD Schema.

We used have a perl script performing the same job in my previous organization but that was quite primitive (didn't handle inheritance etc). perl or python scripts will be super.


回答1:


I've been pretty impressed with CodeSynthesis XSD, although I only tinkered with it. One of the downsides (for our project, anyway) was that they provide custom classes to handle XML Schema items, but I don't believe you can change the mapping to provide your own (at least when I looked at it).




回答2:


Check out XML data binding for C++ like JAXB for java. This is a hard problem that even JAXB doesn't completely solve, but there are incomplete solutions that you might find useful.



来源:https://stackoverflow.com/questions/8802208/jaxb-equivalent-for-generating-c-classes-from-xsd

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!