XML to XSD tool for linux

2020-06-09 01:26发布

问题:

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?.



标签: xml linux xsd