XML file from database

Discussions

XML & Web services: XML file from database

  1. XML file from database (3 messages)

    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)

  2. XML file from database[ Go to top ]

    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
  3. XML file from database[ Go to top ]

    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.
  4. XML file from database[ Go to top ]

    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.