update a xml document if its not empty on c#

The solution for “update a xml document if its not empty on c#” can be found here. The following code will assist you in solving the problem.

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(@”C:\Well.xml”);
XmlNode node = xmlDoc.SelectSingleNode(“/gpx/waypoints/waypoint[@a=’2′]/name”);
node.InnerText = “Something”;
xmlDoc.Save(@”C:\Well.xml”);

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

0
inline scripts encapsulated in