I have not used XML for very long and need to extract the useful information from an XML response. If there are 2 tags that are the same but have a different name e.g
You may use the System.Xml.Linq namespace:
System.Xml.Linq
var xDoc = XDocument.Parse(xml); var result = xDoc.Descendants() .Where(d => d.Name == "lst" && d.Attributes("name").FirstOrDefault()!=null && d.Attributes("name").FirstOrDefault().Value == "overflow") .FirstOrDefault();