2012-01-25 4 views
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'); 
     }); 
    }); 

}); 

답변

1

크로스 도메인 통화처럼 보이는 플러그인 또는 허용 할 항목이 있습니까?

EDIT! 방법의 몇 가지 예를 떠나는 것은 서버 프록시

이 가지고있는 내용

를 RSS 교차 도메인을 읽거나

  1. https://developers.google.com/feed/
  2. http://developer.yahoo.com/yql/
  3. http://zazar.net/developers/jquery/zrssfeed
+0

같은 libary 및 서비스를 사용하는 예, Guardian RSS 피드 int를 포함하려고합니다. o 내 웹 사이트. 나는 그것이 동일한 도메인에 없다면 플러그인을 사용해야한다는 것을 알지 못했다. –

+0

theres는 RSS 피드를 크로스 도메인에 제공한다. OBS! 플러그인에 의해 나는 브라우저 jquery 플러그인을 의미하지 않는다. – megakorre

+0

당연히 http://www.zazar.net/developers/jquery/zrssfeed/를 사용하여 작동시킬 수 있었다. –