如何建立从XML .xsd文件? [英] How do I build an .xsd file from xml?

查看:157
本文介绍了如何建立从XML .xsd文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法来生成一个XML文件的XSD?是否有任何这样做的类文件?我不介意的解决办法是C#或Java。

Is there a way to generate an xsd from an xml file? Are there any class files that do this? I don't mind if the solution is c# or java.

我想为此在code,但如果有什么好的免费的工具,将是确定了。

I would like to do this in code, but if there are any good free tools that would be ok too.

感谢

推荐答案

XSD.EXE 可以做你想做的:

xsd.exe can do what you want:

如果您指定XML文件(.xml扩展名),XSD.EXE推断从文件中的数据的模式,并产生一个XSD架构。输出文件具有相同的名称为XML文件,但与扩展名为.xsd。

If you specify an XML file (.xml extension), Xsd.exe infers a schema from the data in the file and produces an XSD schema. The output file has the same name as the XML file, but with the .xsd extension.

这篇关于如何建立从XML .xsd文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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