How to visualize an XML schema?

matt picture matt · Mar 21, 2010 · Viewed 206k times · Source

I have made an XML Schema - all the code basically - and was wondering if there is a way that the code can generate something like this:

enter image description here

If so how can I do it?

Answer

Erik Sjölund picture Erik Sjölund · Apr 18, 2013

The open source command line java application xsdvi creates an interactive diagram in SVG format from an XML Schema Definition. The generated SVG file can be displayed by a modern web browser where the user can expand and collapse the tree by mouse clicking.

Here is an example of a generated diagram

http://xsdvi.sourceforge.net/ipo.svg

The software can be downloaded from

http://sourceforge.net/projects/xsdvi/

It can be run as follows (assuming Java is installed and java.exe is in the path):-

  1. Go to the dist/lib folder.
  2. Run the following command java -jar xsdvi.jar <input1.xsd> [<input2.xsd> [<input3.xsd> ...]] [style]