Saif Khan

{ I am Saif } "Knowledge is power, information is free, share it!"
posts - 24, comments - 111, trackbacks - 0

My Links

News

Archives

.NET

Hardware

Networking

A simple DataSet XSD Viewer

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.

Print | posted on Wednesday, June 01, 2011 6:39 PM |

Feedback

Gravatar

# re: A simple DataSet XSD Viewer

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
1/24/2012 3:35 AM | Mario Romano Colts Neck
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

Powered by: