Régis Cosnier's pages
regis(dot)cosnier(at)free(dot)fr

XSD Diagram
Fork me on GitHub
XSD Diagram is a free Xml Schema Definition (XSD) diagram viewer for Windows written in C# Framework.NET 2.0

Version 1.1 Copyright © 2006-2016 Régis Cosnier, All Rights Reserved.

This program is free software and may be distributed
according to the terms of the GNU General Public License (GPL).

If you have any suggestions, you can send me an email at the following address:
     regis(dot)cosnier(at)free(dot)fr

Features

  • GPL
  • Need of the Microsoft Framework.NET 2.0 (if not already installed) or Mono on Linux
  • Display the elements, the groups and the attributes
  • Show and display the text/HTML documentation of element and attribute when available
  • Walk the displayed tree with the keyboard
  • Print the diagram
  • Export the diagram to TXT, SVG, PNG, JPG and EMF (EMF only with Windows)
  • Zoom the diagram with the mouse wheel while holding the control key
  • XML validation based on the loaded XSD file
  • Registration in the Windows Explorer contextual menu (for Windows administrator only)
  • Drag'n drop a xsd file or url on the main window header
  • Command line image generation

Download

The latest source code is available at github.com/dgis/xsddiagram

Screenshots


The main screen.



The image export screen.


A command line example.


The XSD files display on tab pages.


On Linux with Mono, several command line samples.


The main screen, on Linux with Mono.

License

Copyright (c) 2006-2016 Regis COSNIER, All Rights Reserved.

This program is free software and may be distributed
according to the terms of the GNU General Public License (GPL) version 2.



101 comments

2007/07/04 16:28:42 Tobias Roese
This is exactly what I've been looking for. I'm so glad, I didn't have to write it myself, thank you!

2007/10/16 13:22:56 Terje S
Havent tested it yet, but sounds great

2007/11/08 13:21:53 Rafal T
Great Tool! Very useful, especially for visual thinkers. Thank you for this.

2008/05/28 18:22:02 bugslayer
This sweet! Thanks for the good work.

2008/06/17 08:43:17 Sweet
You Rock, thanks.

2008/07/30 02:15:48 Stefan Pausch (stefan at stefanpausch dot com)
Thanks alot for your tool! - Would you mind adding the "attribute" panel back into the next version, because thats exactle what i need. Thanks alot.

2008/11/06 00:18:52 The Gibster
Any thought to adding the additional information on element to the display? i.e.: <xs:element name="CityName" type="StringLength1to64" minOccurs="0"> It would be nice to have the type, minOccurs, etc be shown in the tool.

2008/11/06 00:19:38 The Gibster
i.e.: element name="CityName" type="StringLength1to64" minOccurs="0"

2008/11/12 14:38:49 Luka M
Great tool! Any chance you could add display references? E.g. change font type or size / reduce or increase text padding in boxes / adjust element spacing, adjust colour preferences? I'm using the tool just for XSD visualisation and I'm finding that for large XSDs there is too much 'space' in the diagram. I'd like to reduce the spacing, reduce padding and increase font size.

2008/11/21 10:19:34 Sascha
Best XSD-Viewer ever seen (much better then some commercial tools)! Thanks a lot! Greetings from Germany!

2008/11/24 09:35:27 Sascha
Thought I found a little bug (min/maxOccurs does not match the correct occurence in element-view). How to contact you?

2008/12/09 17:07:35 Kurt M
Very helpful tool to visualise the structure and some details, I hope you will go on in the development. Something for the to-do list: Is it possible to colour in the diagram the marked element the details are shown for?

2009/02/18 11:26:16 faceman
Can't run under Windows XP Pro. I always get a "XSD Diagram encountered an error" message. (I have .NET framework 2.0 SP1 installed). Any ideas, want to try this tool

2009/02/22 22:52:38 Dragnovich
Grettings from Mexico: Hello It is the most easy to use XSD Viewer, I had used. Keep development! But I cant make it work well to read the external documentation XSD files, from an XSD file, it seems it's a bug. For example I got a example.xsd file and a doc directory. In doc directory I place a example_los.xsd file to document the LOS element. And in the reference from the XSD file I place this: <xs:documentation source="doc/example_los.xsd"/> So when I open the XSD file all displays correctly except for the Documentation window that shows me an error 404 "page not found", because is trying to read: http://doc/patrones_los.xsd. Just to test, I also try uploading the docs to my webserver and changing all doc references to an actuall URL, And it works partially because it downloads the XSD doc files but does not parse them so I got a windows with the XSD source. I had used other applications and they read correctly the documentation files except this.

2009/10/12 11:35:39 Manu ( ksmanu att g-mail dott com )
Am looking for an Altova XMLSpy replacement ( it is very expensive). This tool has a bite :) Making diagrams is a breeze, albeit the interface is like a drawing board. You click on an element and it is emitted. Next you click on another element and that too is there... Need to get used to this interface. Would really appreciate adding *Attribute* nodes... I will try understand the code and try out things. If any user has done somechanges, please let me know of that :) nice to share.

2010/04/09 23:57:36 KK
While looking for a viewer came across this tool. First impresion is "not bad". I would like to know whether it is further supported.

2010/04/12 11:12:29 calculateonline.org
I like this tool as well. Keep up the good work ! Rarely used but unfortunately it does not seem to handle the restriction tag in the context <complexType> <complexContent> <restriction base="baseType"> .... </restriction> </complexContent> </complexType>

2010/04/12 11:14:14 calculateonline.org
I like this tool as well. Keep up the good work ! Rarely used but unfortunately it does not seem to handle the restriction tag in the context <complexType> <complexContent> <restriction base="baseType"> .... </restriction> </complexContent> </complexType>

2010/07/13 15:24:14 Régis
I was a bit lazy, but if you have any suggestions, you can send me XSD file samples/screen shots/patch by email at the following address: regis(dot)cosnier(at)free(dot)fr

2010/08/10 09:50:15 Ossi
A very good tool. I'm using it very often. Thanks

2010/11/01 19:39:38 Régis
I just release a new version 0.8!!!!!!!!!!!!!!! If you download it this afternoon, please download it again, because I fix a last minute bug just now. The changes are: * Jpeg export. * Following the Rex's idea and need, I added a complete command line support for the image generation on Windows and on Linux with the Mono-Project.

2010/12/07 14:51:39 Elem Ique
Thanks for this awesome tool from the bottom of my heart! You saved my day.

2011/01/03 21:01:14 Dirk Walter
Thank you for this tool. It's wonderful.

2011/01/24 04:20:35 shannon
Excellent tool, I can give up altove xmlspy, stylus, oxygen..., haha Thank you

2011/02/03 11:25:41 ML
Just as started giving up hope on finding a decent open/free graphical viewer for XML schemas I stumbled upon this, and it's excellent! Definitely going on my list of great software to remember/recommend...

2011/02/21 14:31:25 Covrig Adrian
i have made some modifications to show the restricion tag mail me at adriancovrig@gmail.com if u whant this version.

2011/03/02 10:05:15 Boris
Sweet, good, awsome!!! Been searching for a tool like this for quite some time now! Thank you, thank you, thank you!

2011/05/18 18:09:55 Uwe
great stuff. is it possible to put hotspots on the svg? simply use [element].svg as the target. That would be even greater!

2011/05/25 10:44:07 Régis
Uwe, what do you mean by "hotspots"? A kind of link to quickly access an element with its id?

2011/07/07 22:42:28 Istvan Viczian
Great tool, thank you! I am using the command line version. When I declare an element and a complex type with the same name, the command line version draws the same diagram twice!

2011/07/12 04:53:19 Paulus
Hello Régis, Thanks for this great and useful tool. How do you obtain an optimal display, where the expansion does not end with a model symbols (or compositors, i.e. sequential, choice, all)? That is instead of level-based expansion, each child will expand until none ends with the compositors.

2011/07/18 09:15:26 Uwe
Sorry for the delay: Hotspots: A kind of link to quickly access an element with its id? Yes. I would like to include the SVG in a html page and use an element on the SVG to link to another page. Is this possible?

2011/08/28 21:12:54 Avijit
Hopefully world's smallest data modeling tool. Amazing. I am looking for such a tool for years. make my life easier. thank you very much.

2011/11/23 08:28:11 ksamuel
Schema XSD is broken ubuntu Ubuntu 11.10: clicking on the open file button make it freeze. Where Can I report bugs ? Cheers

2011/11/23 08:31:08 I may have found why
From the commande line I get: libgluezilla not found. To have webbrowser support, you need libgluezilla installed But if I try to install this lib the system tells me it's not available on the repo anymore.

2011/11/24 13:53:34 Régis
I was aware of that issue after my Ubuntu 11.10 upgrade. But, since this package is removed from Ubuntu, I don't know what to do! I use the .NET WebBrowser to display the XSD (XML) files and the XSD documentation of the selected element. I could modify xsddiagram to optionally use a textbox instead of the WebBrowser.

2011/12/16 16:26:05 Valerio
Grand Tool! The only free XML schema editor with logical viewing capabilities I was able to find. Reduces (but not eliminates) the need for costly commercial applications like Altova XMLSpy, Oxygen XML or Stylus Studio. The 4 topmost missing features are (by decreasing importance): a) the optional display of attributes inside the diagram b) columns in the element/attributes tabs for restrictions (length/pattern/enumerations) c) the ability to validate a chosen XML file against the open schema d) the ability to generate random test XML files complying with the open schema Having these features available would almost completely eliminate the need for more sophisticated (costly, bulky and less intutitive) XML schema editors, like the ones I mentioned. Great thanks for your excellent work!

2011/12/18 15:11:51 Régis
Thank you very much for the suggestion Valerio. I already done your point "c) the ability to validate a chosen XML file against the open schema" for my needs, it will appear in the next version 0.10! Your point d) is already in my TODO list and I just added point a) and b) in this same list! Régis

2012/01/25 13:25:10 Damien
"Régis Cosnier" semble un nom Français? Belge? Québecois? Du coup, j'écris en Français :-) Moi qui suis une quiche en XML-XSD, j'ai réussi à utiliser l'outil en 10 secondes... Preuve qu'il est extrêmement simple... BRA-VO et merci. Damien.

2012/01/25 17:55:03 Selvers
Keep on going with this tool ... regards

2012/01/29 11:47:40 Régis
Salut Damien, Bien deviné ;-) Effectivement, tout est dit dans l'URL: "regis.cosnier.free.fr" J'ai fait ce petit outil pour mes propres besoins et mon seul but était la simplicité d'utilisation. Merci pour les encouragement, Régis

2012/04/13 16:16:29 Suryesh
Merci, J'adore cet outil.

2012/04/24 22:31:31 Urs
Thank you very much for this tool! It's great and I often use it for documentation purposes. The only thing I am missing is the ability to show the XML tag attributes inside the diagram. Great work!!!!!

2012/05/13 23:15:10 Vadim
Thanks a lot!

2012/05/18 14:32:49 bAuman
Thanks a lot for this tool!! I have a problem with xsd files that contain references to other xsd. How can i solve? Thanks

2012/05/19 12:55:00 Régis
@bAuman XSD Diagram should automatically download the other include/import xsd files. If not (because of a proxy or other), you still have the option to manually download them by yourself and copy them beside the main xsd file, and load again... It may still have some bugs, but please describe the issue with more accuracy, or send me your xsd files (if not confidential) at regis(dot)cosnier(at)free(dot)fr Régis

2012/06/01 14:53:39 bob
any chance of adding the attributes to the element in the diagram?

2012/09/19 16:02:32 Régis
@bob Not for now, but I can add that good idea in the TODO list. If someone have the time to add the attributes in the diagram, he is more than welcome to modify the source code in Github. I just fix some bugs in the new version 0.12 too!

2012/10/12 23:26:56 geeek
great! This tool did exactly what I urgently need for my thesis much better than any MagicDraw :) Thanks

2012/10/18 02:01:03 Jow
Great job man... I need talk with you, how i contact you?

2012/12/06 12:14:10 AlexM
Salut Regis, cet outil est reelement formidable, bien plus efficace et leger que tous les autres outils que j'ai essaye utiliser. I'd find it really powerful to add a browser window on the right... if one adds a html link to external documentation (i.e. annotation/documentation contains an url which links to a logical model.. owl ontology... etc, or annotation/appinfo contains an url... or even an href references an externally managed scheme... ) that would be a huge advantage to have all that in one place. on peut toujours rever.... bravo en tout cas, bravo!! Alex

2012/12/06 12:21:58 AlexM
oh, and allow the specification of a complex type in the command line as a root... for the same component used in multiple schemas from one library. I'm so demanding!! but all the other commercial tools i've tried are seriously lacking. You are on to something here... merci! Alex

2012/12/12 16:58:34 Matt
In the features section is says "Show the text/HTML documentation of element and attribute when available" however I can't see any html I put in the documentation, it is just leaving out anything within the html tags. Please let me know if I have confused myself. Merci, Matt

2012/12/13 10:39:45 Matt
Ah, my mistake I've spotted where I went wrong

2013/01/22 12:19:22 Steph
So helpful! I've rarely been more eager to donate, but where/how?

2013/01/24 19:08:56
Hi my name Anh and from Viet nam, I was read your FreeTideMini in java for mobile, it’s very great for me when I used on my phone But I found a problem , when I extract your Freetidemini.jar and change tide a port of France to VietNam . I change main port Cherbourg in France to main port Mui Vung Tau in Viet nam and your program work correct ( I compare with Wxtide32), but when I change Subport River Ho Chi Minh (with correction main port Vungtau) , it’s run uncorrect in time from 20h today to 03h tomorrow Example Your Freetidemini calculate 25/1/2013 21h49 = 2.4 m Wxtide32 25/1/2013 21h49 = 2.1 m FreeTide get error is 0.3 m , its too larger ( I was test many time and also check difference GMT time in Viet nam and France but get error 0.3m ) Special sub-port in France correction with main-port Cherbourg work very good (same result with Wxtide32 I don’t khow why it uncorrect in sub-port Ho Chi Minh in Vietnam (37 data Vungtau ,Datum get from Wxtide32 and of subport HoChiMinh ) Can’t you review your source code and make it calculate correct I hope version 0.4 soon , thanks very much and hava a nice day

2013/02/14 14:02:44 Andreas
Great Tool! How can I show the attributes of an element. I would like to do that with the console too. Thanks!

2013/02/21 18:41:36 Pieter
Finaly something usefull for free and even no setup required. Thanks!!!

2013/03/27 23:39:58 GKS
Thank you for a great free tool.

2013/05/14 09:57:31 Damien S
Nice work ! I use it really often at work. Thanks for this smart tool.

2013/08/04 21:42:35 infestation
Would you please provide a key to the symbols used in the diagram. It would be very helpful

2013/08/10 18:40:04 Regis
@infestation: Do you mean a document which explains how the elements, types and groups are represented?

2013/11/25 19:13:19 Christian R.
Is it possible to generate a list of fields with their Xpath for a XSD - The idea would be to generate a list which can be used for documentation / field explanation in a document. Thank you

2014/06/25 14:24:44 Kurt C.
Does the trick. Exactly what I needed. Thanks.

2014/08/06 00:30:47 Martin M.
Nice elegant tool and just what I was looking for. Thanks !

2014/09/29 11:07:40 Mörbe R.
thank you so much!

2014/10/23 22:13:07 Brian Pratt
Beautiful, just what I needed! Many thanks.

2014/12/01 10:10:02 Jörg S.
Great Tool! Im using XSD Diagramm since several years. But I have one wish: Is it possible to include a possibilty to show the length of an element?

2015/02/03 16:30:04 Nicolas B.
thank you for your work https://fsfe.org/campaigns/ilovefs/artwork/graphics/printable/ilovefs-postcard.pdf

2015/07/28 10:38:16 Jose C.
This is just great. Very simple but works like a charm!

2015/08/11 09:33:58 Eduard H.
It is so nice. I love it.

2015/11/18 17:21:52 Michael B.
Regis, This is a really great tool!. Our vendor's XSD uses many Complex-Types, and XSD Include files that make it hard to really see (visually) what's possible. This tool resolves that. I also really like how it handles XSD Includes. One feature suggestion (if it's already there then excuse me) is to be able to fully-explode a element (all the way down). You could call it (Expand All), and make it a right-click menu option.

2016/02/02 14:47:08 Andrei M.
For some reason it seems to hang when opening IP-XACT schemas. I tried with other files and it works but none of the IP-XACT ones.

2016/02/02 15:03:14 Andrei M.
Actually not all, but some only - and obviously the ones needed :). e.g. component.xsd.

2016/02/08 15:23:08 Regis
Thanks for the all positive comments! @Andrei M. I tried with the version 0.17 on windows and Linux, and I'm able to open the URL: http://accellera.org/images/xmlschema/ipxact/1685-2014/component.xsd I also tried to open: http://accellera.org/images/xmlschema/ipxact/1685-2014/index.xsd or even to download each file one by one, and then open the file in xsddiagram, and it seems to work. Are you behind a proxy? May be xsddiagram is unable to download a dependency from internet? I hope you may get it works from your side! @Michael B. You can expand a schema at the depth you want by using the command line: XSDDiagram.exe -r component -e 10 http://www.accellera.org/images/xmlschema/ipxact/1685-2014/component.xsd Be careful, depending of the reached depth, it can take a lot of memory.

2016/02/10 20:38:29 Rene Vazquez
Its a Great Tool for design an review the base schemas for applications thanks for all your work!!!

2016/02/18 14:45:47 Lewis
Thanks a lot ! It's a great tool /very useful. Have a nice day, Lewis

2016/02/23 11:06:35 Mikael
Hello, Thanks for a great tool. Could it be possible to add support for going through the tree using the arrow keys and not only the mouse, that would be great :-)

2016/02/24 21:01:59 Patrick
Great Tool. Thanks !

2016/02/27 23:10:47 Regis
@Mikael The new version 1.0 includes the navigation with the arrow keys in the diagram. Enjoy ;-)

2016/03/01 17:29:59 kouinkouin
Thanks ! I had a large XSD and your tool permits me to have a global view on it, without to lost my eyes :) .

2016/04/20 14:39:26 m¿hael
Hi there, I'm very content with this tool and I encountered following problem: Validation result depends on Tag-Order. See example below... Validation Passed: ... <Tag1 id=0></Tag1> <Tag1 id=1></Tag1> <Tag2></Tag2> ... Validation Failed: ... <Tag1 id=0></Tag1> <Tag2></Tag2> <Tag1 id=1></Tag1> ...

2016/04/20 15:49:17 m¿hael
Sorry, It isn't an error, actually its a wrong definition in my .XSD file and thus the validation is correct. So please ignore my post above ;)

2016/05/04 00:40:43 Regis
@m¿hael You are welcome :-)

2016/06/27 14:15:14 Stefan Bormann
Thank you very much for implementing the "documentation" feature into the image generation! That makes the build server generated images much more useful. I have one proposal for improvement: Please make a lower boundary for the width of a documentation block. For a very short element name the documentation results in many wrapped words and many lines. That is hard to read.

2016/07/11 10:56:42 Regis
@Stefan Bormann, I fix the documentation issue in the new version 1.1. Now, short element with documentation will appear longer! I hope it is enough.

2016/07/13 09:17:29 Stefan Bormann
Perfect! Thanks!

2016/08/10 15:50:22 NoukNouk
I have a few improvement suggestions: - Add some display parameter like font type / size for tags / annotation... background color, vertical margin between tags... - Element window should be logically sorted - for example I think that name, type, minoccur, maxoccur, nillable should be on the top of this windows... and other unquoted data can remain in alphabetical order after these 5 first... - In element window again, type is showing the related namespace. It could be great to have the possibilty to hide it (or maybe duplicate type with a full type with namespace and short type W/O namespace) Merci pour cet outil :)

2016/08/10 16:00:13 NoukNouk
And I just saw another improvement: - "Pattern" tab addition with the Annotation / Element window in order to show tag restriction/pattern like this one: <xs:restriction base="xs:string"><xs:pattern value="[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}" /></xs:restriction> Thanks

2016/09/01 15:08:36 Vitya404
Maybe my expectations are low, but I genuinely find it better than Enterprise Architect. Amazing work! Merci monsieur, c'est vraiment top!

2016/09/04 23:16:30 Régis
@NoukNouk Thank you for the suggestions. I will try my best to add it, especially about the display parameters. @Vitya404 Thank you for your support!

2016/10/05 09:07:47 MarioMuja
Hi Régis, I have a set of schema files for an SAP cost center entity. The schemas were generated in Visual Studio using the BizTalk Server SAP Adapter. The BizTalk Schema editor displays a nice hierarchy but I did not manage to get the same or similar result or any usable hierarchy view in your tool. Please don't misunderstand - your tools looks really nice and I appreciate your work. May I send you the files so that you can help me to get a reasonable view out of the XSD files? My mail address is mario.muja@gmx.de. Please send me your address and I respond with the files. Thanks a lot for your help. Regards, Mario

2016/10/07 18:00:46 MarioMuja
Thanks a lot for your quick response Régis. This is a super tool. I already found some important documentation from our SAP department in my IDOC schemas that I overlooked when viewing the BizTalk schemas in Visual Studio.

2016/10/18 14:54:46 Kevin
Very nice tool. I was searching for something to help me generate diagrams for xsd elements automatically to include them into a large Latex documentation file. One problem I encountered: I am using an xsd with multiple imports and so I have the same element names in different namespaces. When I only set the element name in the -r parameter of the CLI I get an image with both of the elements. Any attempt to specify a namespace in -r has led to an empty image. Is there no option of using namespaces to select the root element or did I do something wrong?

2016/10/21 10:46:28 Regis
@Kevin Sorry, I understand your issue because it is the current limitation. But maybe we can imagine to add the namespace in a next revision, like this: -r MyElement1@http://mynamespace/hello -r MyElement2@http://namespace2

2016/10/21 11:16:51 Regis
@Kevin This is now available here: https://github.com/dgis/xsddiagram/raw/master/XSDDiagram.exe

2016/10/23 01:10:34 Mel
Do you the "+" prefix to an element to indicate something special? If you do what does it mean. Thanks Mel

2016/10/31 17:06:30 Oleksandr
Hi guys! Thank you so much for your work. Tool is working as expected.

2016/11/14 13:42:55 Kevin
Thanks Regis, the namespace addition works like a charm. I have another suggestion. I am using xsddiagram only as a commandline tool to do batch generation of diagrams. For this purpose it is a bit annoying that the programm automatically goes in GUI mode if the parameters are not correct. I propose an additional command line switch that suppresses GUI mode and maybe prints out an error message with the parameter that was faulty or missing for successful command line mode. I realize that may have an significant impact on the codebase depending on how the error handling is implemented. But even without an error message a GUI switch would prevent hundreds of GUI processes beeing started due to a faulty script. Thanks for the good work Kevin

2016/11/24 15:08:20 Regis
@Mel The + should allow to open the next element. If it does not open something, there is a bug. If possible, you can send me the xsd file which displays the issue at regis.cosnier@free.fr. Thanks. @Oleksandr Thank you! @Kevin So, I could add a -no-gui switch!

2016/12/01 18:00:59 AJ
Outstanding.


From
Text

Human factor: please enter "MOB" in this field

Page size about 80419 octets. Server generation in 0.018 seconds. Client load in seconds.