我用WebClient
獲取用於Windows Phone的8和Android 的HttpClient隨着WebClient的雅虎數據發送事件後我能做的適用於Windows 8的WebClient替代方案?
WebClient client = new WebClient();
client.DownloadStringCompleted += new DownloadStringCompletedEventHandler(client_DownloadStringCompleted);
client.DownloadStringAsync(url);
;
StringReader stream = new StringReader(e.Result)
XmlReader reader = XmlReader.Create(stream);
reader.ReadToFollowing("yweather:atmosphere");
string humidty = reader.MoveToAttribute("humidity");
但在Windows 8 RT中沒有這樣的事情。
如何獲取以下數據? >http://weather.yahooapis.com/forecastrss?w=2343732&u=c
你看過'HttpClient'嗎? – 2013-03-03 23:04:36