how to find the value xml file and update <p><strong> Hi Expects </strong></p> <p>                    How to find the particular value particular value and update  particular xml element value in asp.net in c#.net</p> <p><strong> xml format</strong></p> <p> &lt;paddress&gt;<br/>     &lt;autoid&gt;0&lt;/autoid&gt;<br/>     &lt;fname&gt;Ranganathan&lt;/fname&gt;<br/>     &lt;lname&gt;palanisamy&lt;/lname&gt;<br/>     &lt;address&gt;bangalore&lt;/address&gt;<br/>     &lt;mobile&gt;9886974230&lt;/mobile&gt;<br/>     &lt;phone&gt;04295287563&lt;/phone&gt;<br/>     &lt;mail&gt;ranganathan@gmail.com&lt;/mail&gt;<br/>   &lt;/paddress&gt;</p> <p><strong>my problem is </strong></p> <p>   programming wise find &lt;autoid&gt; and <strong>how to update</strong> fname,lname,address,mobile,phone &amp; mail</p> <p> plz share the example code</p> thanks for sharing  your knowelege<hr class="sig">Ranganathan.P., Software Developer., Bangalore India.© 2009 Microsoft Corporation. All rights reserved.Thu, 18 Jun 2009 06:55:31 Z65c06264-dad5-4949-a327-0534965ef523http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/65c06264-dad5-4949-a327-0534965ef523#65c06264-dad5-4949-a327-0534965ef523http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/65c06264-dad5-4949-a327-0534965ef523#65c06264-dad5-4949-a327-0534965ef523Ranganathan Palanisamyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ranganathan%20Palanisamyhow to find the value xml file and update <p><strong> Hi Expects </strong></p> <p>                    How to find the particular value particular value and update  particular xml element value in asp.net in c#.net</p> <p><strong> xml format</strong></p> <p> &lt;paddress&gt;<br/>     &lt;autoid&gt;0&lt;/autoid&gt;<br/>     &lt;fname&gt;Ranganathan&lt;/fname&gt;<br/>     &lt;lname&gt;palanisamy&lt;/lname&gt;<br/>     &lt;address&gt;bangalore&lt;/address&gt;<br/>     &lt;mobile&gt;9886974230&lt;/mobile&gt;<br/>     &lt;phone&gt;04295287563&lt;/phone&gt;<br/>     &lt;mail&gt;ranganathan@gmail.com&lt;/mail&gt;<br/>   &lt;/paddress&gt;</p> <p><strong>my problem is </strong></p> <p>   programming wise find &lt;autoid&gt; and <strong>how to update</strong> fname,lname,address,mobile,phone &amp; mail</p> <p> plz share the example code</p> thanks for sharing  your knowelege<hr class="sig">Ranganathan.P., Software Developer., Bangalore India.Wed, 17 Jun 2009 12:53:15 Z2009-06-17T12:53:15Zhttp://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/65c06264-dad5-4949-a327-0534965ef523#4dc266fa-a3fe-4b78-abb9-415f76af11d4http://social.msdn.microsoft.com/Forums/en-US/windowsxps/thread/65c06264-dad5-4949-a327-0534965ef523#4dc266fa-a3fe-4b78-abb9-415f76af11d4Ranganathan Palanisamyhttp://social.msdn.microsoft.com/Profile/en-US/?user=Ranganathan%20Palanisamyhow to find the value xml file and update thnaks for viewers <br/> <br/> i got solution <br/> <br/>    <span style="font-family:Arial;color:black">XmlDocument doc = new XmlDocument();<br/> doc.Load(&quot;C:\\YourXmlFile.xml&quot;);<br/> XmlNodeList nodes = doc.GetElementsByTagName(&quot;autoid&quot;);<br/> <br/> foreach (XmlNode node in nodes)<br/> {<br/> if (node.InnerText == &quot;0&quot;)//If autoid is 0<br/> {<br/> XmlNode ParentNode = node.ParentNode;<br/> string[] strNewList = {&quot;autoid&quot;,&quot;newfname&quot;,&quot;newlname&quot;,&quot;newAddress&quot;,&quot;newMobile&quot;,&quot;newPhone&quot;,&quot;newMail&quot;}; <br/> for (int i = 1; i &lt; ParentNode.ChildNodes.Count; i++)<br/> {<br/> node.ParentNode.ChildNodes[i].InnerText = strNewList[i];<br/> }<br/> }<br/> }<br/> doc.Save(&quot;C:\\YourXmlFile.xml&quot;);</span><hr class="sig">Ranganathan.P., Software Developer., Bangalore India.Thu, 18 Jun 2009 06:55:31 Z2009-06-18T06:55:31Z