Generate XML Schema(.xsd) to C++ class

前提是你 提交于 2019-12-24 19:47:23

问题


I'm new to C++ compare to my ex in using Java and C#. I often use xsd.exe in C#(a plugin in visual studio) to generate C# class from an XML schema

In java I use this command

I have tried using several tools such as(XBEditor, WinLMX,...) to generate C++ class but the result is often different between them and It doesn't look like a C# or Java class but contain too many other information. I just want to ask what is the tool used the most in parsing .xsd to .cpp or In Cpp, this topic doesn't have much support.


回答1:


Using xsd.exe can also parse .xsd to C++ code by this command :

xsd /language:CPP your.xsd /classes.

It will produce your.h file.



来源:https://stackoverflow.com/questions/59132321/generate-xml-schema-xsd-to-c-class

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