1

I want to extract the titles, images and text from any kind of Feed Rss ( feedburner, xml, etc ).

How can I do this with javascript ?

For example, I want to extract the stuff above from this feed:

http://feeds.mashable.com/Mashable

and from this feed:

http://casadipacheco.blogspot.com/feeds/posts/default

xRobot
  • 25,579
  • 69
  • 184
  • 304
  • Looks like we have some people who don't know what they don't know downvoting. We should be allowed to see who downvoted. – unomi Oct 13 '10 at 08:28
  • How are images extracted from the Feed RSS HTML snippet? – Scott Feb 06 '13 at 15:13

1 Answers1

2

Google feeds api: http://code.google.com/apis/ajaxfeeds/

google.load("feeds", "1");


    function initialize() {
      var feed = new google.feeds.Feed("http://feeds.mashable.com/Mashable?format=xml");
      feed.load(function(result) {
        if (!result.error) {
          var container = document.getElementById("feed");
          for (var i = 0; i < result.feed.entries.length; i++) {
            var entry = result.feed.entries[i];
            var div = document.createElement("div");
            div.appendChild(document.createTextNode(entry.title));
            container.appendChild(div);
          }
        }
      });
    }
    google.setOnLoadCallback(initialize);
Q_Mlilo
  • 1,729
  • 4
  • 23
  • 26