Replacing Some Elements in XML [Sample XML Provided]

前端 未结 1 1528
[愿得一人]
[愿得一人] 2021-01-29 15:18

I have an xml document that looks like this.I have a XML file structured as below. Sample XML is as follows:

    
    
      

        
1条回答
  •  隐瞒了意图╮
    2021-01-29 15:30

    var xdoc = XDocument.Load(path_to_xml);
    var groupByName = xdoc.XPathSelectElement("//groupBy/name");
    groupByName.Value = "STATE";
    xdoc.Save(path_to_xml);
    

    0 讨论(0)
提交回复
热议问题