foreach(XmlNode node in nodeList)
{
if (node.Attributes["key"].Value=="servername")
node.Attributes["value"].Value="twmis";
if (node.Attributes["key"].Value=="username")
node.Attributes["value"].Value="sa";
if (node.Attributes["key"].Value=="password")
node.Attributes["value"].Value="centaurus";
}
doc.Save(@"WindowsApplication1.exe.config");