Here i will code you how to copy the data from XML file to DataSet or DataTable Using C# in .Net. XML File Should be in the below format as Shown below., here am calling ReadXML() function for binding XML Data into DataSet or DataTable.

C# Code

       protected void Page_Load(object sender, EventArgs e)
            DataSet Ds = new DataSet();
            Ds = ReadXML();
        public DataSet ReadXML()
            string filePath = "D:\\Self Practice\\Sol1\\Sol1\\Information.xml";
            DataSet ds = new DataSet();
            return ds;



<?xml version="1.0" encoding="utf-8" ?>
  <key id="001">
  <key id="002">
  <key id="003">

  <key id="004">

  <key id="005">

  <key id="006">

  <key id="007">
    <value>Drum Stick</value>