如何使用常见包含从xsd生成多个类? [英] How can I generate multiple classes from xsd's with common includes?

查看:302
本文介绍了如何使用常见包含从xsd生成多个类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Aloha

我收到了一些不错的xsd文件,我想将它们转换为类(使用xsd.exe)
所有的xsd都有相同的包含,像这样:

I received a few nice xsd files which I want to convert to classes (using xsd.exe) All the xsd's have the same includes, like this:

<xs:include schemaLocation="kstypes.xsd" />
<xs:include schemaLocation="ksparams.xsd" />

当我为每个xsd生成一个类时,这些文件中声明的类型对于每个原始xsd都是重复的。有没有简单的方法1)只生成包含的xsd中的类型一次和2)确保所有其他类使用这些类型?

When I generate a class for each xsd the types declared in these files are duplicated for each original xsd. Is there any easy way to 1) only generate the types in the included xsd's once and 2) make sure all other classes use these types?

-Edoode

推荐答案

尝试这里概述的方法:
http://blog.hosca.com/blog/fpmlgen/

try the approach outlined here : http://blog.hosca.com/blog/fpmlgen/

这篇关于如何使用常见包含从xsd生成多个类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆