1

Possible Duplicate:
Parse RSS with jQuery

I want to read the dynamically generated RSS Feed using jquery.Or else is there any other way to read the feed.

Community
  • 1
  • 1
user1430163
  • 109
  • 1
  • 5
  • 13

2 Answers2

3

you can use the jQuery Feeds plugin to retrieve and display your feeds. It has nice features as cross-domain and templating support.

$('#feeds').feeds({
    feeds: {
        myfeed: 'http://path/to/your/feed'
    }
});
camagu
  • 71
  • 5
  • Unfortunately now "broken and unmaintained" according to the author. But there is another that is maintained, here: https://github.com/jfhovinne/jFeed – moodboom Feb 14 '16 at 02:15
  • No that one is old too, sorry. Try this: https://github.com/enginkizil/FeedEk – moodboom Feb 14 '16 at 05:01
0

you can use the jquery plugin jfeed to parse a rss feed and display the content

http://hovinne.com/articles/jfeed-jquery-rss-atom-feed-parser-plugin/

a function that displays the first 5 titles of a atom feed you would look like this

$(document).ready(function() {
    jQuery.getFeed({
        url: 'blog/articles.atom',
        success: function(feed) {
            for(var i = 0; i < feed.items.length && i < 5; i++) {
                var item = feed.items[i];
                $("div#feed").append("<div><a href='"+item.link+"'>"+item.title+"</a></div>");
            }
        }
    });
});
Nikolaus Gradwohl
  • 19,708
  • 3
  • 45
  • 61
  • Hi Nikolaus Gradwohl Thanks for giving the reply.If i use as you mentioned it is telling that jquery.getFeed is not a function.I just copied the code you mentioned and changed the url to my feed url.Any thing more i need to do?I am new to jquery.So can you explain how to resolve this. – user1430163 Jul 11 '12 at 09:36