Duncan McC

I have designed a Windows Form database and I currently store my data in memory.

Now I am looking to store data from a windows form database into an XML file instead of memory.

I will need to read and write data to this file and possibly delete it.

I have checked around but i am not finding many clear answers.

Can someone please help as this is driving me crazy !!


Re: .NET Framework Data Access and Storage XML File Storage


What u mean by Windows Form Database

To store data in Xml file u can use XmlDocument class.

It provides necessary functionality to wrok with XML file.

Re: .NET Framework Data Access and Storage XML File Storage


If you are looking for storing a dataset or datatable into an XML file and you are using ADO.Net 2.0. You can use the functions of the mentioned classes.
Dataset.WriteXml (filePath);
You can also look at the Walkthrough: Reading XML Data into a Dataset.

If you are storing much data think about saving the xml in binary format.  I think that the article on codeproject about Searcharoo3 is a nice reference.