Geeks With Blogs
Saif Khan { I am Saif } "Knowledge is power, information is free, share it!"

Earlier this week I had a requirement for displaying an XSD DataSet schema in my application to the end-user. I couldn’t find a free or relatively cheap component. All the items I came across were either too bulky (loads of functionality) or pricey. I was also looking for something along the lines of a user-control which I could drop on a form and wire-up. I decided to roll my own…after an hour I came up with this

 

6-2-2011 1-54-55 AM

 

I used Open Diagram engine…pretty much straight forward.

6-2-2011 2-25-04 AM

 

To keep things simple I didn’t mess with the XSD schema via XML. I just loaded the schema into a dataset object and pass it to the control I created

DataSet ds = new DataSet();
ds.ReadXmlSchema("C:\\XSDViewerControl\\DataSet1.xsd");
XsdExplorer1.SetDataSet = ds;
XsdExplorer1.DiaplayDiagram();
 

When I have some time I’ll add a property grid and probably use docking windows…and “Foreign-Key” references on the diagram. This was just a quick solution.

Posted on Wednesday, June 1, 2011 6:39 PM | Back to top


Comments on this post: A simple DataSet XSD Viewer

# re: A simple DataSet XSD Viewer
Requesting Gravatar...
This is truly one of the posts that really helps you with your issues. I have a hard time copying config files because of the time it takes to complete the job. Hopefully, this will answer all my queries and take the monkey off my back. - Mario Romano Colts Neck
Left by Mario Romano Colts Neck on Jan 24, 2012 3:35 AM

# re: A simple DataSet XSD Viewer
Requesting Gravatar...
Do you have this code available?
Can you email it to me ?
Left by Dimitris on Mar 07, 2012 9:25 PM

# re: A simple DataSet XSD Viewer
Requesting Gravatar...
I had a lot of trouble displaying an XSD DataSet schema as well, it's how you said it, it's either too expensive, either it leaves me with no money in my wallet. Great job you did here, it looks just like my house after mom's come visiting.
Left by Web Security on Jun 25, 2012 10:20 PM

Your comment:
 (will show your gravatar)
 


Copyright © saifkhan | Powered by: GeeksWithBlogs.net | Join free