用于 Linux 的 XML 到 XSD 工具

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6843388/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 05:17:30  来源:igfitidea点击:

XML to XSD tool for linux

xmllinuxxsd

提问by Aitor

What's the best tool out there to create (or to infer) an XSD schema from XML document? I need it to be linux-compatible.

从 XML 文档创建(或推断)XSD 模式的最佳工具是什么?我需要它与 linux 兼容。

采纳答案by Sam

In the past I have used Trang : http://www.thaiopensource.com/relaxng/trang.html

过去我使用过 Trang :http: //www.thaiopensource.com/relaxng/trang.html

Its old and basic but i find it generates cleaner schemas than other tools (e.g. XMLSpy)

它古老而基本,但我发现它比其他工具(例如 XMLSpy)生成更清晰的模式

回答by marc

You can create a DTD from XML using DTDGeneratorfrom the saxon project. Then you can convert this to a XSD using W3C's dtd2xsd.pl. See Free DTD to XSD conversion utility?.

您可以使用来自 saxon 项目的DTDGenerator从XML 创建 DTD 。然后您可以使用 W3C 的dtd2xsd.pl将其转换为 XSD 。请参阅免费的 DTD 到 XSD 转换实用程序?.