Better way to find xml node?

DarKZonEINTHAI

New Member
Can anyone tell me if there is a better way to search an XML file and replace a value?The node could exist anywhere, so can't use xpath.I can achieve what I want with the following, but just wondering if there is an easier way.\[code\] XmlDocument doc = new XmlDocument(); doc.Load("c:\\test.xml"); XmlNodeList elemList = doc.GetElementsByTagName("NameToChange"); for (int i=0; i < elemList.Count; i++) { elemList.InnerText = "replacedText"; } \[/code\]TIADave
 
Back
Top