Yahoo weather rss feed解析错误

时间:2014-04-03 11:12:23

标签: javascript jquery rss

我正在尝试使用jquery解析Yahoo weather RSS feed。

我正在使用How to parse an RSS feed using JavaScript?

中的代码
$.get('http://weather.yahooapis.com/forecastrss?w=2502265', function(data) {
        $(data).find("channel").each(function() {
            var el = $(this);

            console.log("------------------------");
            console.log("title      : " + el.find("title").text());
            console.log("description: " + el.find("description").text());
        });
    });

现在在Firebug控制台中,此行以红色显示

GET http://weather.yahooapis.com/forecastrss?w=2502265 200 OK 1.84s

如果我展开这个,我在xml标签

下收到错误
XML Parsing Error: no element found Location: moz-nullprincipal:{b89cceaa-43a2-4015-b9cf-578d1ce6afee} Line Number 1, Column 1:

我该如何解决这个问题?

0 个答案:

没有答案