0

I am trying to write a simple RSS parser for my website. Although I am getting error

XML Parsing Error: no element found Location: moz-nullprincipal:{85891b5c-0ab8-4b89-92ba-bdef3e044891} Line Number 1, Column 1:

What does this error mean?

$(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 Answer 1

1

that looks like a cross domain call do you have a pluggin or something to allow for that?

EDIT! leaving some examples of ways to read rss crossdomain

have your server proxy the content

or use a libary and service like

  1. https://developers.google.com/feed/
  2. http://developer.yahoo.com/yql/
  3. http://zazar.net/developers/jquery/zrssfeed
Sign up to request clarification or add additional context in comments.

3 Comments

Yes, I want to embed the Guardian RSS feed into my website. I didn't realise I needed to use a plugin if it wasn't on the same domain
theres ways to get rss feeds cross domain. OBS! by pluggin i mean jquery plugin not a browser one
Yes of course managed to get it working using zazar.net/developers/jquery/zrssfeed

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.