XML to XSD

If I have a complex XML file, is there a cheap or free way to get an approximate approximation of XSD from it?

+4
source share
5 answers

A good xml to xsd converter is Trang. This is a command line tool that is very small and does the trick. It can be found on the kam blog - http://www.dotkam.com/2008/05/28/generate-xsd-from-xml/

+2
source

If you are using Visual Studio, it includes a console program called xsd.exe, which can automatically generate schemas from xml.

It can also automatically generate classes or datasets from schemas.

+1
source

Yes. There are tools that can parse your XML and provide XSD. For example, Visual Studio 2005 and 2008 include the Create XSD command from the IDE, as well as the xsd.exe command-line tool that does this.

However, note that it can only output XSD from the provided XML, so XSD can only validate this file correctly. Once you have created your XSD, you should consider refactoring it against other XML files to make sure that it matches the format you want to test.

0
source

XmlSpy also has this feature. If it's better than VS, I don't know. But for working with xml and xsds, I prefer et over VS any day

0
source

I used this tool to create an XSD file from xml: http://www.whiterocksoftware.com/2019/04/xsd-from-xml.html This is not a command line or basic user interface.

0
source

Source: https://habr.com/ru/post/1277535/


All Articles