I need to parse an XML document, but I can't use XDocument. Without going into technical details of why I can't use it, how can I accomplish this? I can, however, use XmlDocument and other methods.
var restaurants = from r in xdoc.Root.Elements("Restaurant")
select new {
Name = (string)r.Element("name"),
Location = (string)r.Element("location")
};
foreach(var restaurant in restaurants)
{
String name = restaurant.Name;
String location = restaurant.Location;
}