Marc Gravell
9/15/2008 11:05:00 AM
Something like:
XmlDocument doc = new XmlDocument();
doc.Load(path);
XmlElement el
(XmlElement)doc.SelectSingleNode("/configuration/connectionStrings/add[@name='ProgramService']");
if (el != null)
{ // found
el.SetAttribute("connectionString", "foo");
}
el =
(XmlElement)doc.SelectSingleNode("/configuration/appSettings/add[@key='loggingLevel']");
if (el != null)
{ // found
el.SetAttribute("value", "bar");
}
doc.Save(path);
Marc