If all you need is an XSD so that the corresponding XML code matches it, you would be much better off creating it yourself rather than using the tool.
No one knows better than you schema features such as valid values ββ(for example, is the <maxlength> element? true and false only valid values ββfor <required> ?).
If you really want to use the tool (I would advise you to use it if you have not developed XML and really can not get a real XSD, or if you developed it, double check the generated XSD) you can try Trang . It can infer the XSD schema from a series of XML examples.
You will need to take into account that the XSD tool you can do may be incomplete or inaccurate if the XML samples are not representative enough.
java -jar trang.jar sampleXML.xml inferredXSD.xsd
Here you can find an example of using Trang here .
Xavi LΓ³pez
source share