This is also thanks to Obislavu:
You can write a function which takes parameters the node name you want to set and the new value to put there.
This function locates the node for which you want to change its value, set the InnerText property to that value and calls Save().
void UpdateSettings(string key, string val)
{
try
{
XmlDocument oXmlDocument = new XmlDocument();
oXmlDocument.Load("settings.xml"

;
System.Xml.XmlNode n = oXmlDocument.SelectSingleNode(key);
if (n!=null)
{
n.InnerText= val;
}
//
oXmlDocument.Save("settings.xml"

;
}catch()
{
}
}
UpdateSettings("//router//name",myForm.nameTextBox1.Text);
The same but then as a function which takes a string from a form.
(this is Obislavu's code in my own thread about XML etc)
- Raenius
"Free will...is an illusion"