Hello,

I'm trying to parse RSS feeds with JQuery in order to extract data.
Here's what I've tried:

  $.get('php-lib/proxy.php', {url: 'http://feeds.reuters.com/reuters/
businessNews'}, function(data, textStatus) {
    var feed = $(data);
    var list = $('#headlinesFeed');
    var html = [];
    feed.find('item').each(function() {
      var item = $(this);
      var title = item.find('title').text();
      var link = item.find('link').text();
      var desc = item.find('description').html();
      html.push('<li><a href="' + link + '" target="_blank">' + title
+ '</a></li>');
    });
    list.html(html.join(''));
  });


This seems to work ok, except the link attribute is empty.  It
consistently mis-parses the link attribute.  I've tried various feeds:
http://finance.yahoo.com/rss/topstories
http://feeds.reuters.com/reuters/mergersNews
http://feeds.reuters.com/reuters/businessNews

All of them parse the link tag as empty.  Even stranger, if I specify
the datatype as "xml" via the last parameter in the $.get() function,
I get no data.

Anybody have some working real-world knowledge to share with me about
parsing RSS with JQuery??

Thanks,
-Nate

Reply via email to