First of all this is C#. I am creating a internet dashboard for a small group of colleages in the NHS. Below is an example xml file in which I need to change the innertext
Using XmlDocument
and XPath you can do this
XmlDocument doc = new XmlDocument();
doc.Load(reader); //Assuming reader is your XmlReader
doc.SelectSingleNode("buttons/workshop1").InnerText = "new text";
You can use doc.Save
to save the file also.
Read more about XmlDocument
on MSDN.
EDIT
To save the document do this
doc.Save(@"C:\myXmFile.xml"); //This will save the changes to the file.
Hope this helps you.