Java cli tool for generating XSD from an XML
Latest commit f57c125 Sep 20, 2016 @subwiz subwiz committed on GitHub Merge pull request #7 from ethiclab/ignore-eclipse-files
ignore eclipse generated files XSD Gen

Command-line tool written in Java for generating XSD from an XML. Can also be used as a library within your application.


To generate schema:

$ java -jar xsd-gen-VERSION-jar-with-dependencies.jar /path/to/xml.xml > /path/to/my.xsd

To view additional command-line options:

$ java -jar xsd-gen-VERSION-jar-with-dependencies.jar -h

This tool is available as part of "The Joy of Unix in Windows Tool Bundle":

As Library

To add as dependency in your Maven project:



import org.wiztools.xsdgen.XsdGen;


XsdGen gen = new XsdGen();
gen.parse(new File("in.xml"));
File out = new File("out.xsd");
gen.write(new FileOutputStream(out));