I have an xml document that looks like this.I have a XML file structured as below. Sample XML is as follows:
var xdoc = XDocument.Load(path_to_xml); var groupByName = xdoc.XPathSelectElement("//groupBy/name"); groupByName.Value = "STATE"; xdoc.Save(path_to_xml);