title: How to add new data to existing xml file and xml file has to keep old data as well as newly added data using DATASET in windows forms application
body: <p>I am developing supermarket application using windows forms. In this project I have a form to add new product details whenever i fill that form and click submit button the newly added product details should add to already existing xml file which is used to store all the products details and it has to keep old product details also. I want to create this xml file using dataset/data table. i can have to add 'n' no. of products in a single XML file. In the below xml file 'P2' is newly added product and xml has to store this 'P2' product and keep old data like 'P1' product</p>
  
  <pre><code>&lt;?xml version="1.0" standalone="yes" ?&gt; 
   - &lt;SuperMarketStock&gt;
   -   &lt;ProductDetails&gt;
        &lt;ProductName&gt;P1&lt;/ProductName&gt; 
        &lt;ProductId&gt;PID 1&lt;/ProductId&gt; 
        &lt;Date&gt;5/10/2012&lt;/Date&gt; 
        &lt;Quantity&gt;10&lt;/Quantity&gt; 
        &lt;CostPrice&gt;10.50&lt;/CostPrice&gt; 
        &lt;SellingPrice&gt;12.00&lt;/SellingPrice&gt; 
     &lt;ProductDetails&gt;
  &lt;ProductDetails&gt;
      &lt;ProductName&gt;P2&lt;/ProductName&gt; 
      &lt;ProductId&gt;PID2&lt;/ProductId&gt; 
      &lt;Date&gt;06/10/2012&lt;/Date&gt; 
      &lt;Quantity&gt;10&lt;/Quantity&gt; 
      &lt;CostPrice&gt;50.00&lt;/CostPrice&gt; 
      &lt;SellingPrice&gt;55.00&lt;/SellingPrice&gt; 
  &lt;/ProductDetails&gt;
   ........
   ........
   .......
  &lt;/SuperMarketStock&gt;
  </code></pre>
  
  <p>And I use below code but i am not able to get my requirement Plz guide me...</p>
  
  <pre><code>private void btnAdminSubmit_Click(object sender, EventArgs e)
    {
      if(rbtnAddNew.Checked.Equals(true))
       {
      DataTable adminDT = new DataTable("ProductDetails");
      adminDT.Columns.Add("ProductName");
      adminDT.Columns.Add("ProductId");
      adminDT.Columns.Add("Date");
      adminDT.Columns.Add("Quantity");
      adminDT.Columns.Add("CostPrice");
      adminDT.Columns.Add("SellingPrice");
      adminDT.Rows.Add(tbxAdminProductName.Text, tbxAdminProductID.Text,   tbxAdminDate.Text, tbxAdminQuantity.Text, tbxAdminCostPrice.Text, tbxAdminSellingPrice.Text);
        DataSet adminDS = new DataSet("SuperMarketStock");
        adminDS.Tables.Add(adminDT);
        adminDS.WriteXml("stockDetails.xml");
          }
  </code></pre>