db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Saving XML into a database
Date Thu, 28 Aug 2008 17:30:07 GMT

----- Original Message ----- 
From: "Iwud H8u" <iwudh8u@hotmail.com>
To: <derby-user@db.apache.org>
Sent: Thursday, August 28, 2008 6:21 PM
Subject: Re: Saving XML into a database

Hi Valentin,

Thanks for suggesting this... I should have been more specific with my
initial question. I have in-memory XML DOM objects which need to be saved
into a database... If I adopt your approach, I will need to save my DOM
objects to a file before reading them in...

I am looking for a way to insert in memory XML DOM objects into the database
because my code generates these xml objects programatically.

Any ideas on how to do this?



but instead of using a FileStream... you going to stream it to a buffer and 
then say to String Buffer, and then stick it in the database... this is 
normal Java core coding.
I'm not sure how xerces does it... but I have a feeling that standard Java 
XML serialization is a representation of the object... whereas xerces 
probably turns it back into the original XML.
Doesnt really matter... as long as you bring it back in the same way...

I would just do it in the same way as I serialize any class... to a blob... 
but if you do serialize to XML either the Java way or xerces way... I think 
its just a string... varchar will probably do fine.
Its just Java serialization... I think, not too much to do with the db and 
if you do do it the Java way... should matter what dB engine you on.... I 

Have fun...
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm

View raw message