问题
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