How to modify existing XML file with XmlDocument and XmlNode in C#

You need to do something like this: // instantiate XmlDocument and load XML from file XmlDocument doc = new XmlDocument(); doc.Load(@”D:\test.xml”); // get a list of nodes – in this case, I’m selecting all <AID> nodes under // the <GroupAIDs> node – change to suit your needs XmlNodeList aNodes = doc.SelectNodes(“/Equipment/DataCollections/GroupAIDs/AID”); // loop through all … Read more