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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In the past I have used 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)
回答2:
You can create a DTD from XML using DTDGenerator from the saxon project. Then you can convert this to a XSD using W3C's dtd2xsd.pl. See Free DTD to XSD conversion utility?.