XElement rootXml = XElement.Load("http://ws.geonames.org/countryInfo?lang=it&country=DE"); var Countries = from C in rootXml.Elements() select new { Code = (string)C.Element("countryCode"), Name = (string)C.Element("countryName") }; foreach (var x in Countries) Console.WriteLine("{0} {1}", x.Code, x.Name); Console.ReadKey();
DE Germania
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)