Hi!
The simplest way!
XmlDocument xmlDocument = new XmlDocument();
xmlDocument.Load(Environment.CurrentDirectory + "\\" + "test.xml");
XmlNodeList nodelist = xmlDocument.SelectNodes("/ROOT/WEB/THEME");
nodelist.Item(0).InnerText = "New Theme";
xmlDocument.Save(Environment.CurrentDirectory + "\\" + "test.xml");
Stephane
"Sergey Dubinets" <sd**@online.microsoft.com> wrote in message
news:us**************@TK2MSFTNGP11.phx.gbl...
You can load xsl file to DOM -- XmlDocument, change required text node and
save DOM back or to another file.
You can use XSLT to do all three steps for you.
Sergey
--
This posting is provided "AS IS" with no warranties, and confers no
rights.
"Anita C" <an****@ptm-software.com> wrote in message
news:us**************@TK2MSFTNGP10.phx.gbl... A code snippet from an xml file that I want to edit:
<?xml version="1.0" encoding="utf-8" ?>
<ROOT>
<WEB>
<THEME>Default</THEME>
I am trying to replace the 'InnerText' - Default with the text present
in a textbox 'txt1'. How do I accomplish the above?
Thanks in advance.