on 12-12-2006 12:35 PM
Hi All
I am presently working on JAVA mapping which retrives the data construct the xml I want to dynamically generate the xml tag name (table column names of the Table) is there any way to do it
Thanks
Jayaraman
Hi,
Can you give more details? Maybe with an example?
Regards,
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can get column names from database tables as...
ResultSet resultSet=statement.executeQuery("select * from table");
resultSetMetadata=resultSet.getMetaData();
String col1 = resultSetMetadata.getColumnLabel(1); ---> to get first column name
and use in XML node creation as...
Document document = DocumentHelper.createDocument();
Element root = document.addElement("Root");
Element Node1 = document.addElement(col1);
Regards,
Uma
txs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.