从 XML 实例文档生成 XSD 模式的任何工具? [英] Any tools to generate an XSD schema from an XML instance document?

查看:31
本文介绍了从 XML 实例文档生成 XSD 模式的任何工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种工具,它可以获取 XML 实例文档并输出相应的 XSD 架构.

I am looking for a tool which will take an XML instance document and output a corresponding XSD schema.

我当然认识到,与手动创建模式相比,生成的 XSD 模式会受到限制(它可能不会处理可选或重复元素或数据约束),但它至少可以作为一个快速起点.

I certainly recognize that the generated XSD schema will be limited when compared to creating a schema by hand (it probably won't handle optional or repeating elements, or data constraints), but it could at least serve as a quick starting point.

推荐答案

Microsoft XSD 推理工具 是一个很好的免费解决方案.许多 XML 编辑工具,例如 XmlSpy(由 @Garth Gilmour 提到)或 OxygenXML Editor 也具有该功能.不过,它们相当昂贵.BizTalk Server 也有一个 XSD 推断工具.

the Microsoft XSD inference tool is a good, free solution. Many XML editing tools, such as XmlSpy (mentioned by @Garth Gilmour) or OxygenXML Editor also have that feature. They're rather expensive, though. BizTalk Server also has an XSD inferring tool as well.

我刚刚发现了 .net XmlSchemaInference 类,所以如果你使用 .net 你应该考虑

edit: I just discovered the .net XmlSchemaInference class, so if you're using .net you should consider that

这篇关于从 XML 实例文档生成 XSD 模式的任何工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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