how to reset the serial in order in xml file using C#
<p>i used the following code to add serial number in xml file automatically</p>

<pre><code> int node = doc.GetElementsByTagName("Sno").Count;
            if (node == 0)
            {
                sno.InnerText = "1";
            }
            else
            {
                int i;
                i = Convert.ToInt32(doc.DocumentElement.LastChild["Sno"].InnerText);
                sno.InnerText = Convert.ToString(i + 1);
            }
</code></pre>

<p>and i bind the xml file to datagrid, if i delete the particular row, the row was deleted, but i want to reset the serial again. suppose i delete the number 1 means, automatically the remaining serial number shows from 1.</p>
