tôi sử dụng WebClient
để lấy dữ liệu của Yahoo dành cho Windows Phone 8 và Android HttpClient Với WebClient tôi có thể làmWebClient thay thế cho windows 8?
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(url);
sau khi gửi sự kiện;
StringReader stream = new StringReader(e.Result)
XmlReader reader = XmlReader.Create(stream);
reader.ReadToFollowing("yweather:atmosphere");
string humidty = reader.MoveToAttribute("humidity");
nhưng trong Windows 8 RT thì không có thứ gì như vậy.
làm cách nào tôi có thể tìm nạp dữ liệu sau? >http://weather.yahooapis.com/forecastrss?w=2343732&u=c
Bạn đã xem 'HttpClient' chưa? –