-
XML file from database (3 messages)
- Posted by: Anil Kumar
- Posted on: July 11 2001 01:05 EDT
I want to query a database such as DB2 or Oracle8i and retreive the data (query results) in a XML file. Is it possible to do this? Should I store the query result to Java Bean(s) and then convert to XML?Threaded Messages (3)
- XML file from database by Venkat Srinivasan on July 11 2001 07:47 EDT
- XML file from database by Albert Zamus on July 11 2001 10:04 EDT
- XML file from database by raghu tss rao on July 11 2001 12:58 EDT
-
XML file from database[ Go to top ]
- Posted by: Venkat Srinivasan
- Posted on: July 11 2001 07:47 EDT
- in response to Anil Kumar
Did you try using Oracle XDK ?. I think it has the necessary api to read Tables as XML and to insert XML into databases.
Check out
http://technet.oracle.com/software/tech/xml/xdk_java/htdocs/listing.htm
You will need to create a technet login for this.
Venkat -
XML file from database[ Go to top ]
- Posted by: Albert Zamus
- Posted on: July 11 2001 10:04 EDT
- in response to Anil Kumar
alternatively if you don't want to be tied to Oracle api's use Jaxp, the Java xml API's or Xerxes api's from apache. -
XML file from database[ Go to top ]
- Posted by: raghu tss rao
- Posted on: July 11 2001 12:58 EDT
- in response to Albert Zamus
It depends on how complex your xml is
-one xml to one database table
0r
- one xml from many database tables based on complex joins.
Now if you have the simple case you can write your own class which looks at the jdbc meta data and builds your xml for you.
The complex xml requires more work, so you are better off using some ready made packages for that. Things to look out..do they allow multilevel nesting. Oracle tools "do not" allow multilevel level nesting. You may also have to build some database object views.
Look at tools at apache or IBM developer works for some more insight into this.