0
내 웹 사이트에 간단한 RSS 파서를 쓰려고합니다. 오류가 발생하지만jQuery XML 구문 분석 오류
XML Parsing Error: no element found Location: moz-nullprincipal:{85891b5c-0ab8-4b89-92ba-bdef3e044891} Line Number 1, Column 1:
이 오류는 무엇을 의미합니까?
$(function() {
var rssUrl = "http://www.guardian.co.uk/energy-saving-trust/rss";
$.get(rssUrl, function(data) {
var $xml = $(data);
$xml.find("item").each(function() {
var $this = $(this),
item = {
title: $this.find("title").text(),
link: $this.find("link").text(),
description: $this.find("description").text(),
pubDate: $this.find("pubDate").text(),
author: $this.find("author").text()
}
alert('got here');
});
});
});
같은 libary 및 서비스를 사용하는 예, Guardian RSS 피드 int를 포함하려고합니다. o 내 웹 사이트. 나는 그것이 동일한 도메인에 없다면 플러그인을 사용해야한다는 것을 알지 못했다. –
theres는 RSS 피드를 크로스 도메인에 제공한다. OBS! 플러그인에 의해 나는 브라우저 jquery 플러그인을 의미하지 않는다. – megakorre
당연히 http://www.zazar.net/developers/jquery/zrssfeed/를 사용하여 작동시킬 수 있었다. –