How to create XML/XSD from SQL table with multiple tables
what I want to do is create an XML schema from a database (or database schema)
This post has some interesting code
Particularly
DataSet results = new DataSet();
SqlCommand command = new SqlCommand("SELECT * FROM table", new SqlConnection(connectionString));
SqlDataAdapter sqlAdapter = new SqlDataAdapter(command);
sqlAdapter.FillSchema(results, SchemaType.Mapped);//Fills dataset with schema from query
results.WriteXmlSchema(mySchema);
But how do I generate this XML schema from multiple tables? If I just do
Select * from table1,table2
All of the data is in one big blob in the XML
What I want is each table defined in the XML with it's contents separately. something