XML is a general purpose tag based language and very easy to transfer and store data across applications. XML Serialization is the process of serializing a .Net Object to the form of XML file or from an XML to .Net Object.
During XML serialization, only the public properties and fields of an object are serialized. The following C# source code shows how to De-Serialize the DataSet as it is streamed from an XML file back into memory.
using System.Xml.Serialization ;
public partial class Form1 : Form
private void button1_Click(object sender, EventArgs e)
DataSet ds = new DataSet();
XmlSerializer xmlSerializer = new XmlSerializer(typeof(DataSet));
FileStream readStream = new FileStream("serialXML.xml", FileMode.Open);
ds = (DataSet)xmlSerializer.Deserialize(readStream);
dataGridView1.DataSource = ds.Tables;
Click here to download serialXML.xml