How I made pretty XSD pictures in VS 2010 (image heavy!)

Ok, I was going to post this in Nitey47's faction mod guide but since I have too many pics I didn't want to threadjack.

Anyhow, I have VS 2010 Ultimate, so I am not sure if this is part of the visualization tools (which effing rock, btw), or if this is part of the standard package. So this is how I did it step by step, warning: lots of pics, but I wanted to be complete.

OK, First I opened up the xml  file in VS 2010. Then in the menu bar I went to XML---->Create Schema

This gives us the .xsd file. Right click on it and choose "View Designer"

 

Which brings us to this screen. Left click on the root element and drag it onto the design surface

This leaves us with a rather bland graph view. Click on the 2nd button (which gives you the tooltip "Show content model view" if you hover over it).

Now, click on the down arrows to open up the child nodes.

And finally, right click on the design surface and choose "Export diagram as image". Note that you can only export it as an .xps file. I printed it to .pdf and saved off the .pdf as a .png to upload. If you have a better way to get to a .png or .jpg then great.

 

Hopefully this was clear enough for anyone to follow. If your version of VS 2010 does not have these options, I can probably be persuaded to do this for any other xml files, just get me a list. I would prefer to be uploading them to a wiki type structure instead of various threads on here though, since things would be a bit more organized that way.

Hope this helps.

9,691 views 2 replies
Reply #1 Top

I tried doing this with Visual C# Express 2010 (free version) and I couldnt get the "View Designer" to work. Theres a toolbar named View Designer but its grayed out (If I right click it doesnt pop up there). I did manage to get the XSD file, but afterwards I couldn't find a way to get the designer to work.

Now I honestly don't know what the XSD is for, I figure its for more advanced users, I'm just a beginner and don't really know much about VS at all. But I figured I would let you know that at least in VS2010 Express, you can't (or at least I couldn't) get the View designer to work :P.

There is an Elemental Wiki that you could use to post your info, it is open to everyone at the moment, heres the link.

http://elementalwarofmagic.wikidot.com/

Reply #2 Top

The designer may be part of the visualization tools that only come on the Ultimate version. Those tools really put the "Visual" in Visual Studio, btw. Walking through the namespaces on the standard MS libraries gives me a great idea on how it all relates to each other. 

The XSD is the definition of the xml file. Basically it lays out the structure and type of the data in the xml file. It is very handy for projects like what Murteas is working on, since he needs to consistently read/write faction data. Do note that the XSD does not specify valid ranges for the data, only the types of data it expects for each node. Ranges are handled by the engine, I think.

And if you look at the members of the wiki site, you'll find I am member #2 (Isepick) tho I shamefully have not contributed anything in a long long time  :blush: