C# Xml Manipulation: Replace InnerText of Node
Just loop through your xml structure using xPath as usual then call the InnerText property to set the new value.
XmlDocument xdocLocalFile = new XmlDocument(); xdocLocalFile.Load("MyXmlFile.xml"); foreach (XmlNode xNodeReplace in xdocLocalFile.SelectNodes("root/phunk")) { xNodeReplace.FirstChild.InnerText = "My new Value"; }
