且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从 xsd 生成 C++ 类的 JAXB 等价物?

更新时间:2022-10-20 19:43:54

让我印象深刻CodeSynthesis XSD,虽然我只是对它进行了修改.缺点之一(无论如何对于我们的项目而言)是它们提供自定义类来处理 XML Schema 项目,但我不相信您可以更改映射以提供您自己的(至少在我查看它时).>

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.

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).