Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to transform Java object to XMLTYPE ?

673660Feb 6 2009 — edited Feb 11 2009
hi,

I have a Java object (POJO), that I would like to store to oracle xdb (XMLTYPE table). Is there a way to have something like XmlType.createXML(connection, POJO) or XmlType.createXML(connection, POJO, schema) ?

Currently I transform it as -->
POJO -> DOM-> String -> InputStream -> XMLTYPE.create( connection, Istream )
or
POJO -> DOM-> -> XMLTYPE.create( connection, DOM ) -- which is too slow as xml text size increases above 15kb

2. My JDBC connection is slow. If theres a way to avoid it in XMLType creation, thts even better.
3. Pls suggest other ways of doing this.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2009
Added on Feb 6 2009
2 comments
1,017 views