|
Balazs, How do you retrieve database data today? With JDBC and JDOM, you can put together a simple program very quickly. I don't have a stand alone example that goes directly from JDBC to XML (I use Hibernate to load a list) but you should be able to create one with JDOM very quickly. One trick you can use is to select your data to the xml column names you need something like: select rtrim(MYFILE.COLUMNNAME)", "column-name",... Next create a result set and then retrieve the metadata from the result set. Use those column names as you iterate through the data to set your element names with JDOM. You will first create a root Element, then attach Elements as content to the root Element using the metadata column names and your result set. You would then attache the root Element to a Document and create an XMLOutputter to write to a file or whatever makes sense in your situation. David Morris >>> balazs.vojtek@xxxxxxxxxxx 1/29/2004 1:58:53 AM >>> Hello, It's a really simply issue: I have to export some data from a single iSeries file into 2 kinds of various XML formats based on the value of a specified field. I'm wondering whether someone could give me a hint how to begin with the sipliest way. I've checked the classical XML Java API-s and also XML4J, but I've found them a bit complicated. Now I'm searching for the simpliest solution that would build the DOM structures from the schemas and add the data from the files into nodes and finally output the document. I'm not currently interested using third-party product for this purpose. Thank you for your help Best Regards Balazs
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.