Is there any way I can at least export a table schema from MSSQL or MySQL to a DTD file? Also the same for the data of the tables to XML.
I am really not getting how to write DTDs, so I badly need a generator, and seeing how I have the DB set up, I'd say that's the easiest way?
Best Answer
You could try using MySQL's mysqldump utility.
There is an option to make mysqldump export in XML
In your case, you could dump the table mydb.mytable like this:
EXAMPLE
For the given table
just mysqldump to a textfile.
Here is what the XML actually looks like
As for the DTD itself, you should look around StackOverflow and ServerFault
You could also XML dump just the structure using
--no-data
optionwhich produces
Take that output and scult it into a DTD