<top id=""1"" value=""test-1"" />
<top id=""2"" value=""test-2"" />
public static void Main()
using (StringReader sr = new StringReader(xml))
XPathDocument d = new XPathDocument(sr);
foreach (XPathNavigator n in d.CreateNavigator().Select("//tops/top"))
var idValue = n.GetAttribute("id", "");
Console.WriteLine("----");
Console.WriteLine(idValue);