Problems reading RSS feed with jQuery.get()

Posted by bbeckford on Stack Overflow See other posts from Stack Overflow or by bbeckford
Published on 2010-03-22T10:35:43Z Indexed on 2010/03/22 10:41 UTC
Read the original article Hit count: 468

Filed under:
|
|

Hi there, I've been pulling my hair out trying to use jQuery.get() to pull in my dynamically generated RSS feed and I'm having nothing but issues, is my RSS feed the wrong format? If so can I convert it to the correct format using javascript?

Here's my feed: http://dev.chriscurddesign.co.uk/burns/p/rc_rss.php?rcf_id=0

Here's my code:

function get_rss_feed() {

        $(".content").empty();

        $.get("http://dev.chriscurddesign.co.uk/burns/p/rc_rss.php?rcf_id=0", function(d) {

            var i = 0;
            $(d).find('item').each(function() {

                var $item = $(this);
                var title = $item.find('title').text();
                var link = $item.find('link').text();
                var location = $item.find('location').text();
                var pubDate = $item.find('pubDate').text();

                var html = '<div class="entry"><a href="' + link + '" target="_blank">' + title + '</a></div>';

                $('.content').append(html);
                i++;
            });

        });
};

Any input would be greatly appreciated!! Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript