我想从http://www.google.com/ig/api?weather=
获取天气我用这个C#谷歌的天气XML越来越
// load xml result from Google weather
var addr = WebUtility.HtmlEncode("http://www.google.com/ig/api?weather=vilnius&hl=lt");
XDocument xd = XDocument.Load(addr);
// navigate to current conditions node
var current_conditions = from currentCond in xd.Root.Descendants("current_conditions")
select currentCond;
// navigate to Forecast info node
var forcastInfo = from forecastinfo in xd.Root.Descendants("forecast_information")
select forecastinfo;
我使用的URL http://www.google.com/ig/api?weather=vilnius&hl=lt
但在英语获取信息,我无法找到问题,请帮助:)
当我打开我的浏览器的网址,我没有看到任何英文单词,但只有立陶宛。在浏览器中打开结果时结果如何? – Yogu
英文;(也许问题是在位置设置在PC – Wizard
我在德国,我的浏览器也是德国人,所以这应该是没有问题的 – Yogu