views:

20

answers:

1

Microsoft has made saving objects very easy with their LINQ to SQL mapping.

However, I would sometimes like something a little more lightweight, i.e. the ability to save objects to a file when an application closes, and read them back in again. XML seems like a natural data format rather than inventing a new data format. (Of course, one could argue that XML is the new ascii, and we still have the problem of defining the data schema etc. ..).

Is there a predefined method of doing this, or am I going to have to manually figure out an XML data format and write routines to read/write them, i.e. by constructing a DOM equivalent and then saving as XML?

+1  A: 

How about working with your data in DataSets and DataTables, etc - then serializing them as XML?

cxfx