Create XSD from database programmatically in C #

My database schema has matured a lot. The XSD has grown in size, making it difficult to use the Visual Studio 2008 designer. Is there a way to automate XSD generation?

+2


source to share


5 answers


Found this tool while trying to solve another problem.

Download: http://sourceforge.net/projects/mygeneration/



XSD Template: http://www.mygenerationsoftware.com/TemplateLibrary/Archive/?guid=59a03408-c96f-4baf-8171-b6bfe8725dab

Pretty simple.

0


source


I've done this in past lives using catalog stored procedures that would enumerate all tables, columns, and indexes and run the resulting dataset using a templating engine (created at the time, but Codesmith would match a 100% score or a clever xslt transformation).

Here are the stored procedures you can use: http://msdn.microsoft.com/en-us/library/ms182764.aspx



Then you can either do the conversion in the process, or export the entire dataset to xml.

Hooray!

+1


source


Assuming you're talking about datasets, can you just drag and drop everything onto the design surface?

0


source


Altova XmlSpy has built-in functions to transform your database structure into a kind of XSD. This may not be what you want.

0


source


0


source







All Articles