开发者

generate xsd from xml [duplicate]

开发者 https://www.devze.com 2023-03-02 15:35 出处:网络
This question already has answers here: Any tools to generate an XSD schema from an XML instance document? [closed]
This question already has answers here: Any tools to generate an XSD schema from an XML instance document? [closed] (10 answer开发者_StackOverflows) Closed 9 years ago.

I need a tool to automatically generate an xsd from an xml file.

Are there tools that do this? How does it work?

Thanks!


Most "big" XML editors boast this feature but in my experience, none can really deliver. The last time I tried (yesterday), Altova XML Spy generated crap.

But there is a deeper problem to automated schema generation from XML. In most cases, your Schema will be tied to the one file it was generated from, as the generator is unaware of all the restrictions and defaults you need to have a usable, flexible and safe schema.

There are some tools that could make the creation of Schema really easy. You can start with a visual editor like Liquid XML Studio -it has the nicest visual Schema editor I have seen.

Disclaimer : I am in no way affiliated to Liquid Technologies :)


There are several tools such as Altova.

If you would like to do this command line or in code trang is a good option.

0

精彩评论

暂无评论...
验证码 换一张
取 消