C#雅虎天气API5天预测

问题描述:

我一直狩猎左右,但我有这个挣扎,我想从雅虎天气XML 5天的天气预报,即时通讯试图挑选以下数据:C#雅虎天气API5天预测

/description> 
yweather:forecast day="Thu" date="27 Jun 2013" low="51" high="60" text="Partly Cloudy" code="29"/> 
yweather:forecast day="Fri" date="28 Jun 2013" low="45" high="59" text="Rain" code="12"/> 
yweather:forecast day="Sat" date="29 Jun 2013" low="52" high="58" text="Mostly Cloudy" code="28"/> 
yweather:forecast day="Sun" date="30 Jun 2013" low="49" high="62" text="PM Showers" code="39"/> 
yweather:forecast day="Mon" date="1 Jul 2013" low="48" high="61" text="Partly Cloudy" code="30"/> 

我可以从第一行获取数据,yweather:forecast day =“thu”date =“2013年6月27日..........

但我无法弄清楚如何从任何其他行,日=“星期五”,坐,太阳

任何帮助非常感谢

欢呼声

+0

这将帮助,如果你表现出你正在使用的数据拉代码。 – Kixoka

+0

'Temperature = channel.SelectSingleNode(“item”)。SelectSingleNode(“yweather:condition”,manager).Attributes [“temp”]。Value; Condition = channel.SelectSingleNode(“item”)。SelectSingleNode(“yweather:condition”,manager).Attributes [“text”]。Value;代码= channel.SelectSingleNode(“item”)。SelectSingleNode(“yweather:condition”,manager).Attributes [“code”]。Value。 – Birdog

+0

第一次发布,仍然习惯于格式化,apoliogies – Birdog

也许你可以尝试一个API与一个甜蜜的JSON响应?

我会建议Metwit weather API
这是一个易于使用的完全REST API,它可以*使用,用于许多合理的用途。

到这里看看:http://soup.metwit.com/post/47181933854/an-alternative-to-yahoo-weather-api

最后但并非最不重要的,你可以实现它们的客户端:200请求/天(基于IP的限制),无需任何身份验证。
免费使用限制设置为每个IP 200个请求,每个访客可以请求每天200次!

(全面披露:我Metwit的创始人随意问我进一步的细节)

+0

好的API它甚至没有token.Thanks分享。 –