Generating Database schema as XML output

Hi...Can someone tell me how to generate Database Schema as XML? (any API's) ... my final requirment is to create a tool in java to compare two databases for mismatch in table structure and data, (including triggers, stored procedures, sequences, etc...).Thanks in advance.
[295 byte] By [nikhilfrancisa] at [2007-10-3 9:53:46]
# 1

Hi..

If i got you right. There is java.sql.DatabaseMetaData which give you information about your database Structure.

So you build your query after that;

There is a program call Jasper Report, has an API called iText which help print the result in any format, from XML to pdf. To make life simpler there is something call iReport which builds for you xml, so you don't need all the headache doing it.

G_Abubakra at 2007-7-15 5:11:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

Thanks for the reply.

To be precise I want to generate the entire database schema in XML from database structure. (Same feature is provided by Altova XMLSpy).

It would be great if there was some API that does the process of parsing the database structure and generating the XML automatically. A similiar feature is provided by Apache DdlUtils' API, but a stable version is not yet available...

nikhilfrancisa at 2007-7-15 5:11:26 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...