public List<City> ProcessCity()
{
XDocument xDoc = XDocument.Load("http://nextbike.net/maps/nextbike-official.xml");
var cities = from city in xDoc.Descendants("city")
let stations = from station in city.Elements("place")
select new Station
{
Lat = Double.Parse(station.Attribute("lat").Value, provider),
Lng = Double.Parse(station.Attribute("lng").Value, provider),
Address = station.Attribute("name").Value,
Free = SpecialConvert(station.Attribute("bikes").Value),
Total = -1
}
select new City
{
Name = city.Attribute("name").Value,
Stations = stations.ToList(),
TimeStamp = DateTime.Now
};
return cities.ToList();
}