问题
Is there any tool to convert xsd to c++ code. The generated code can be used for serialization and parsing the xml. It should also be run as a independent.
I saw some opensource tools like CodeSynthesis but it has covered by GPL license.
I am looking for a tool which will generate code that could run independently.
回答1:
xsd.exe generates code for C++\CLI too.
It is not added in \languages in the documentation. But when executing xsd.exe in VS CommandPrompt, in the \languages section you could see CPP.
Generate the cpp code using the following command : xsd.exe some.xsd /l:CPP /c
来源:https://stackoverflow.com/questions/35743475/tool-to-convert-xsd-to-c-code