users@jaxb.java.net

Re: Storing JAXB structured XML in Oracle

From: William Saxton <saxton_at_gmail.com>
Date: Wed, 16 May 2007 12:35:41 -0400

Thanks for the info so far. I don't know if I want to really get into
Hibernate right now, as there is so much new stuff to learn as it is ;
)

On 5/16/07, Hank Ratzesberger <hankr_at_crustal.ucsb.edu> wrote:
>
>
> Disclaimer: I haven't done this on an application of any
> size.
>
> Since you already have a schema, Oracle can "shred" your
> schema to tables, and you can annotate your schema to
> control table names and other aspects.
>

Isn't this more of an Oracle XML DB thing? I'm using a relational
database...

You can use XQuery to get XMLType data.
>

What about using .extract('...').getStringVal() ?

You would unmarshall the data to store it, and marshal
> your query results -- not saving objects, but XML.
>

Don't you marshall data (obj->writer) to store the information? Maybe I
don't have a firm grasp of this stuff, so I'm confused. Can you give me a
simple example?

For a considerable fee, Oracle consultants will get the
> whole thing configured.
>
> http://www.oracle.com/technology/tech/xml/xmldb/index.html
>
> Cheers,
> Hank
>
> Hank Ratzesberger
> http://nees.ucsb.edu/
> Institute for Crustal Studies
> University of California, Santa Barbara
>
> ----- Original Message -----
> *From:* William Saxton <saxton_at_gmail.com>
> *To:* users_at_jaxb.dev.java.net
> *Sent:* Wednesday, May 16, 2007 7:36 AM
> *Subject:* Storing JAXB structured XML in Oracle
>
> Hi all,
>
> Fairly new JAXB user here with a question.
>
> What is the best way to store XML data handled by JAXB objects?
> Currently, I marshal the object to a string, use XMLType.createXML to
> convert it to an XMLType, then store it as an object using stmt.setObject().
> Is this the right approach?
>
> I also have the context path somewhat "hard-coded" in the java code in
> order to marshal/unmarshall the data. Do you think I should also save this
> in the database along with the XML or read it from a config file?
>
> Thanks.
>
> -Bill
>
>
>
>