-->
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.  [ 3 posts ] 
Author Message
 Post subject: Object to XML
PostPosted: Mon Aug 27, 2007 12:26 pm 
Newbie

Joined: Mon Aug 27, 2007 12:00 pm
Posts: 3
Hi!

Is there a direct way to convert a given Object (for which a mapping file exists, of course) into an XML document, without the need to store the Object into the DB first?
I've found no example for this use-case so far.

Thanks.
Martin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 6:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
There are a few libs around to convert Java Objects to XML. In many situations I find xstream to be a very helpful library.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 10:34 am 
Newbie

Joined: Mon Aug 27, 2007 12:00 pm
Posts: 3
Thank you for your answer. Yes I know xstreams or e.g. Castor / Jaxb etc.

But because I'm already using Hibernate for the OR-mapping and DB-Data-to-XML mapping, I would not prefer to use another lib for the Object-to-XML mapping.
There are situations where my application needs to send an object (serialized as XML-document) over network, without storing it to DB first.
Is there any chance to do this with hibernate?

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.