-->
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.  [ 7 posts ] 
Author Message
 Post subject: Using NHibernate to Serialize to an XML File
PostPosted: Tue May 29, 2007 5:09 pm 
Newbie

Joined: Tue May 29, 2007 4:57 pm
Posts: 7
Hibernate version: 1.2.0.3001


I am using SQL Server Express primarily as my data store, but every now and then I would like to export one of my entities in the form of an XML file, and later load an entity (read only) from an XML file. Should I just use standard .NET serialization in this case, or is there an approach I can use with the NHibernate framework for this file exporting/importing?


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 11:14 pm 
Regular
Regular

Joined: Sun Jan 21, 2007 4:33 pm
Posts: 65
http://www.hibernate.org/368.html


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 30, 2007 10:59 am 
Newbie

Joined: Tue May 29, 2007 4:57 pm
Posts: 7
Thanks for the link Gortok, but I am not sure that really answers my question. That link seems to deal with how to handle XML data in a particular field, not how to use NHibernate to persist a class to a file in XML format.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 04, 2007 11:15 am 
Newbie

Joined: Tue May 29, 2007 4:57 pm
Posts: 7
Just curious if anyone has anymore info on this topic? If not, I guess I will go ahead and just use .NET serialization.


Top
 Profile  
 
 Post subject: Use SQLite
PostPosted: Mon Jun 04, 2007 6:18 pm 
Newbie

Joined: Mon Jun 04, 2007 6:15 pm
Posts: 9
Hi.

Why not use SQLite. It is a flat file database NHibernate supports

Ciao


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 05, 2007 10:59 am 
Newbie

Joined: Tue May 29, 2007 4:57 pm
Posts: 7
I am the lead contractor for a large corporation. We use SQLServer on the corporate servers and use SQLServer Express on the employees laptops and replicate data to the central server. There is a requirement to export some information to a flat file and that is why I am inquiring.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 05, 2007 8:10 pm 
Newbie

Joined: Mon Jun 04, 2007 3:39 pm
Posts: 4
Location: Winnipeg
I would use NHibernate to inflate the objects and use serialization to get the xml. As long as you can tame .Net xml serialization it is quite powerful.

If you want to eliminate the application layer completely, you could you sqlxml to create xml straight out of db.


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