I have an entity tree, which is fetched by hibernate, and I want to generate xml from the entity tree. In this tree, there are many blob and clob data type. I don’t want to include them in xml, rather I want to keep a reference id in the xml. The blob and clob data will be stored in the file system in the same directory where I put xml.
the generate xml formate sample-
<Address type="varchar" maxLength=”100”>
Los Angeles, CA 90067-6209, USA
</Address>
<Biography type="clob">
<!-- this clob data would be available in the same directory of this xml as a text file. Name format- [row_id]_biography -->
<ref id="44238185_biography"/>
</Biography>
<Image type="blob">
<!-- this blob data would be available in the same directory of this xml as a image file. Name format- [row_id]_image -->
<ref id="44238185_image"/>
</Image>
<DateCreated type="timestamp" format="yyyy-mm-dd hr:mm:ss">
18-04-13 05:12:34
</DateCreated>
I would like to know how do you guys think about this.