Create XSD from database programmatically in C #
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.
source to share
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!
source to share
Altova XmlSpy has built-in functions to transform your database structure into a kind of XSD. This may not be what you want.
source to share