Re: Generating XML tree representation of related database data

From: Erik Hatcher (eri..hatchersolutions.com)
Date: Thu May 12 2005 - 11:55:00 EDT

  • Next message: Jonathan Carlson: "Query Caching (newbie)"

    On May 12, 2005, at 9:09 AM, Ilya Lazarev wrote:

    > hi,
    >
    > Has anyone tried making a XML document from related data in the
    > database with cayenne? I am stuck with this problem right now - I use
    > cayenne to map and work with a number of related tables and need to
    > extract a certain chunk of related data as a xml document for
    > processing into a pdf. It would be possible to manually construct an
    > xml tree, but I am wondering if there is an easier (more
    > automated)way.

    Another alternative without writing code is to export the database to
    XML using DBUnit from Ant. I use this:

         <dbunit driver="${jdbc.driver}"
                 url="${jdbc.url}"
                 userid="${jdbc.username}"
                 password="${jdbc.password}">
             <export dest="${dbunit.data.file}"/>
         </dbunit>

    http://www.dbunit.org

    You would then be able to transform the data to PDF somehow I presume
    (XSLT + FOP?).

         Erik



    This archive was generated by hypermail 2.0.0 : Thu May 12 2005 - 11:55:56 EDT