Using jQuery to parse an RSS feed, having trouble in firefox and chrome

admin

Administrator
Staff member
I used a jQuery library called jFeed to parse and display my blogs rss feed on my personal website. It worked perfectly well at first, but upon checking later it simply displays nothing, except in Internet Explorer, where it seems to work fine.

After checking the javascript console using Firebug in Firefox, it shows an error in the 'XML' tab as follows:

<blockquote>
XML Parsing Error: no element found Location: moz-nullprincipal:{3f8a0c62-32b4-4f63-b69c- 9ef402b40b64} Line Number 1, Column 1:
^
</blockquote>

Though I have no idea what to do with this information. Here is the code I used to get the rss feed and display it (it is almost exactly the same as the example provided by the jFeed website):

<blockquote>
jQuery.getFeed({
url: '<a href="http://sammarshalldesign.co.uk/blog/wordpress/?feed=rss2" rel="nofollow noreferrer">http://sammarshalldesign.co.uk/blog/wordpress/?feed=rss2</a>',
success: function(feed) {
</blockquote>

Code:
        var html = '';

        for(var i = 0; i &lt; feed.items.length &amp;&amp; i &lt; 5; i++) {

            var item = feed.items[i];

            html += '&lt;h3&gt;'
            + '&lt;a href="'
            + item.link
            + '"&gt;'
            + item.title
            + '&lt;/a&gt;'
            + '&lt;/h3&gt;';


            html += '&lt;div&gt;'
            + item.description
            + '&lt;/div&gt;';
        }//end for

        jQuery('#feed').append(html);
    }//end feed function    
});//end getfeed

Any help would be really appreciated.