views:

381

answers:

4

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:

http://www.novell.com/documentation/extend52/Docs/help/Director/books/PGImages/novell_portlet_xml_schema.gif

If so how can I do it?

+6  A: 

That picture is generated from a XML Schema editing tool, such as Altova's XMLSpy.

There are a number of XML tools around, all of which will include a Graphical XSD Viewer. I mentioned XML Spy simply because it is the brand leader. Also many general IDEs like Eclipse, Visual Studio and Oracle JDeveloper will be able to do this trick.

APC
In Eclipse you can right-click the XSD file and choose Open With -> Other... -> XML Schema Editor, although the editor is a little unresponsive browsing a 340kb file.
Andrew Swan
+4  A: 

If you need a simple, more text-oriented documentation of your XSD, check out xs3p - a XSLT stylesheet that will transform your XSD into more readable HTML format. Quite nice, and totally free.

If that's not enough, check out some of the commercial tools out there - I personally prefer the Liquid XML Studio - not as expensive as others, and quite as capable!

They also offer a free Community Edition, but unfortunately, the XSD part is read-only in that free edition, so you can use it to visualize your XML, but in the free edition, you can't change the XML schema.

marc_s
The Community Edition has been superseded by the non-free Starter Edition for USD 106.90 per annum.
Andrew Swan
@Andrew Swan: what a pity.... still - Liquid XML is a great tool
marc_s
A: 

try xsd-viewer from http://code.google.com/p/jlibs

Santhosh Kumar T
Trying this but http://deadlock.netbeans.org/maven2 gives a 404 error, and if I use the org-netbeans-swing-outline JAR file from NetBeans 6.9.1, I get an NPE at DefaultRenderDataProvider.java:49
Andrew Swan
deadlock.netbeans.org/maven2 is down. now I used my personal repository. try with new sources...
Santhosh Kumar T
A: 

We currently offer a tool called DocFlex/XML XSDDoc that allows you to enjoy both things at once:

  • To have a diagram represetation of your XML schema
  • To have all those diagrams embedded (and hyperlinked) in a highly sophisticated XML schema documentation

The diagrams in fact are generated not by us, but by XMLSpy. We implemented an integration with XMLSpy (see "http://www.filigris.com/products/docflex_xml/integrations/xmlspy/")

The whole thing provide a functionality not offered by any single vendor right now on the market!

One our customer was so much impressed that he purchased an extra license for XMLSpy only because of our tool. That's no joke!

P.S.

Actually, I don't understand why somebody negated the main topic of this thread. The question is very much legitimate! (Unlike many others visible here, for whom the main advice would be just to go to a bookstore, buy some basic book and read it a little bit.) It seems this system provides to much voting power to people who really don't deserve it.

Leonid Rudy