-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Object-to-XML-Mapping
PostPosted: Mon Mar 20, 2006 2:41 pm 
Newbie

Joined: Tue Dec 20, 2005 7:22 am
Posts: 5
Is it possible to do an Object-to-XML-Mapping with Hibernate?
I know that there is a possibility to do a Relational-Database-to-XML-Mapping, but i want something like this:
Code:
Document doc = loadXMLDocument();
MyBusinessObject obj = toObj(doc);

....

doc = toXML(obj);
storeXMLDocument(doc);


without touching the database.

How can I accomplish that?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 3:34 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
check out
http://www.hibernate.org/hib_docs/v3/reference/en/pdf/hibernate_reference.pdf

see chapter 18, pg 170

Hope that helps.

_________________
-JT

If you find my replies helpful, please rate by clicking 'Y' on them. I appreciate it.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 21, 2006 5:30 am 
Newbie

Joined: Tue Dec 20, 2005 7:22 am
Posts: 5
jt_1000 wrote:


Not very much.
Citation from the Hibernate Reference, chapter 18:
Hibernate lets you work with persistent XML data in much the same way you work with persistent POJOs. A
parsed XML tree can be thought of as just another way to represent the relational data at the object level, in-
stead of POJOs.

But I want to import/export data without touching the database!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 21, 2006 4:36 pm 
Expert
Expert

Joined: Mon Jan 09, 2006 5:01 pm
Posts: 311
Location: Sacramento, CA
sounds like you want an xmldialect. don't think there is one.
roll-your own? check out: <hib3.1>/src/org/hibernate/dialect

_________________
-JT

If you find my replies helpful, please rate by clicking 'Y' on them. I appreciate it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.