Using XPath, you can find all data nodes with: -
foreach(XmlElement elem in dom.SelectNodes("//Data"))
{
}
where dom is the XmlDocument loaded by your Xml.
Alternatively, if you prefer XDocument: -
foreach(XElement elem in doc.Descendents("Data"))
{
}
source
share