简体   繁体   English

生成 XML Schema(.xsd) 到 C++ 类

[英]Generate XML Schema(.xsd) to C++ class

I'm new to C++ compare to my ex in using Java and C#.与使用 Java 和 C# 的前任相比,我是 C++ 新手。 I often use xsd.exe in C#(a plugin in visual studio) to generate C# class from an XML schema我经常在 C#(visual studio 中的一个插件)中使用 xsd.exe 从 XML 模式生成 C# 类

In java I use this command在java中我使用这个命令在 Java 中

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.我曾尝试使用多种工具(例如(XBEditor、WinLMX、...)来生成 C++ 类,但它们之间的结果通常不同,它看起来不像 C# 或 Java 类,但包含太多其他信息。 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.我就想问一下,解析.xsd到.cpp或者In Cpp用的最多的工具是什么,这个话题支持的不多。

Using xsd.exe can also parse .xsd to C++ code by this command :使用 xsd.exe 还可以通过以下命令将 .xsd 解析为 C++ 代码:

xsd /language:CPP your.xsd /classes . xsd /language:CPP your.xsd /classes

It will produce your.h file.它将生成 your.h 文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM