Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8053875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:59:29+00:00 2026-06-05T07:59:29+00:00

I need to parse an RSS feed (XML version 2.0) and display the parsed

  • 0

I need to parse an RSS feed (XML version 2.0) and display the parsed details in an HTML page.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T07:59:31+00:00Added an answer on June 5, 2026 at 7:59 am

    Parsing the Feed

    With jQuery‘s jFeed

    (Don’t really recommend that one, see the other options.)

    jQuery.getFeed({
       url     : FEED_URL,
       success : function (feed) {
          console.log(feed.title);
          // do more stuff here
       }
    });
    

    With jQuery‘s Built-in XML Support

    $.get(FEED_URL, function (data) {
        $(data).find("entry").each(function () { // or "item" or whatever suits your feed
            var el = $(this);
    
            console.log("------------------------");
            console.log("title      : " + el.find("title").text());
            console.log("author     : " + el.find("author").text());
            console.log("description: " + el.find("description").text());
        });
    });
    

    With jQuery and the Google AJAX Feed API

    $.ajax({
      url      : document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent(FEED_URL),
      dataType : 'json',
      success  : function (data) {
        if (data.responseData.feed && data.responseData.feed.entries) {
          $.each(data.responseData.feed.entries, function (i, e) {
            console.log("------------------------");
            console.log("title      : " + e.title);
            console.log("author     : " + e.author);
            console.log("description: " + e.description);
          });
        }
      }
    });
    

    But that means you’re relient on them being online and reachable.


    Building Content

    Once you’ve successfully extracted the information you need from the feed, you could create DocumentFragments (with document.createDocumentFragment() containing the elements (created with document.createElement()) you’ll want to inject to display your data.


    Injecting the content

    Select the container element that you want on the page and append your document fragments to it, and simply use innerHTML to replace its content entirely.

    Something like:

    $('#rss-viewer').append(aDocumentFragmentEntry);
    

    or:

    $('#rss-viewer')[0].innerHTML = aDocumentFragmentOfAllEntries.innerHTML;
    

    Test Data

    Using this question’s feed, which as of this writing gives:

    <?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:re="http://purl.org/atompub/rank/1.0">
        <title type="text">How to parse a RSS feed using javascript? - Stack Overflow</title>
        <link rel="self" href="https://stackoverflow.com/feeds/question/10943544" type="application/atom+xml" />
            <link rel="hub" href="http://pubsubhubbub.appspot.com/" />        
        <link rel="alternate" href="https://stackoverflow.com/q/10943544" type="text/html" />
        <subtitle>most recent 30 from stackoverflow.com</subtitle>
        <updated>2012-06-08T06:36:47Z</updated>
        <id>https://stackoverflow.com/feeds/question/10943544</id>
        <creativeCommons:license>http://www.creativecommons.org/licenses/by-sa/3.0/rdf</creativeCommons:license> 
        <entry>
            <id>https://stackoverflow.com/q/10943544</id>
            <re:rank scheme="http://stackoverflow.com">2</re:rank>
            <title type="text">How to parse a RSS feed using javascript?</title>
            <category scheme="https://stackoverflow.com/feeds/question/10943544/tags" term="javascript"/><category scheme="https://stackoverflow.com/feeds/question/10943544/tags" term="html5"/><category scheme="https://stackoverflow.com/feeds/question/10943544/tags" term="jquery-mobile"/>
            <author>
                <name>Thiru</name>
                <uri>https://stackoverflow.com/users/1126255</uri>
            </author>
            <link rel="alternate" href="https://stackoverflow.com/questions/10943544/how-to-parse-a-rss-feed-using-javascript" />
            <published>2012-06-08T05:34:16Z</published>
            <updated>2012-06-08T06:35:22Z</updated>
            <summary type="html">
                &lt;p&gt;I need to parse the RSS-Feed(XML version2.0) using XML and I want to display the parsed detail in HTML page, I tried in many ways. But its not working. My system is running under proxy, since I am new to this field, I don&#39;t know whether it is possible or not. If any one knows please help me on this. Thanks in advance.&lt;/p&gt;
    
            </summary>
        </entry>
        <entry>
            <id>https://stackoverflow.com/questions/10943544/-/10943610#10943610</id>
            <re:rank scheme="http://stackoverflow.com">1</re:rank>
            <title type="text">Answer by haylem for How to parse a RSS feed using javascript?</title>
            <author>
                <name>haylem</name>
                <uri>https://stackoverflow.com/users/453590</uri>
            </author>    
            <link rel="alternate" href="https://stackoverflow.com/questions/10943544/how-to-parse-a-rss-feed-using-javascript/10943610#10943610" />
            <published>2012-06-08T05:43:24Z</published>   
            <updated>2012-06-08T06:35:22Z</updated>
            <summary type="html">&lt;h1&gt;Parsing the Feed&lt;/h1&gt;
    
    &lt;h3&gt;With jQuery&#39;s jFeed&lt;/h3&gt;
    
    &lt;p&gt;Try this, with the &lt;a href=&quot;http://plugins.jquery.com/project/jFeed&quot; rel=&quot;nofollow&quot;&gt;jFeed&lt;/a&gt; &lt;a href=&quot;http://www.jquery.com/&quot; rel=&quot;nofollow&quot;&gt;jQuery&lt;/a&gt; plug-in&lt;/p&gt;
    
    &lt;pre&gt;&lt;code&gt;jQuery.getFeed({
       url     : FEED_URL,
       success : function (feed) {
          console.log(feed.title);
          // do more stuff here
       }
    });
    &lt;/code&gt;&lt;/pre&gt;
    
    &lt;h3&gt;With jQuery&#39;s Built-in XML Support&lt;/h3&gt;
    
    &lt;pre&gt;&lt;code&gt;$.get(FEED_URL, function (data) {
        $(data).find(&quot;entry&quot;).each(function () { // or &quot;item&quot; or whatever suits your feed
            var el = $(this);
    
            console.log(&quot;------------------------&quot;);
            console.log(&quot;title      : &quot; + el.find(&quot;title&quot;).text());
            console.log(&quot;author     : &quot; + el.find(&quot;author&quot;).text());
            console.log(&quot;description: &quot; + el.find(&quot;description&quot;).text());
        });
    });
    &lt;/code&gt;&lt;/pre&gt;
    
    &lt;h3&gt;With jQuery and the Google AJAX APIs&lt;/h3&gt;
    
    &lt;p&gt;Otherwise, &lt;a href=&quot;https://developers.google.com/feed/&quot; rel=&quot;nofollow&quot;&gt;Google&#39;s AJAX Feed API&lt;/a&gt; allows you to get the feed as a JSON object:&lt;/p&gt;
    
    &lt;pre&gt;&lt;code&gt;$.ajax({
      url      : document.location.protocol + &#39;//ajax.googleapis.com/ajax/services/feed/load?v=1.0&amp;amp;num=10&amp;amp;callback=?&amp;amp;q=&#39; + encodeURIComponent(FEED_URL),
      dataType : &#39;json&#39;,
      success  : function (data) {
        if (data.responseData.feed &amp;amp;&amp;amp; data.responseData.feed.entries) {
          $.each(data.responseData.feed.entries, function (i, e) {
            console.log(&quot;------------------------&quot;);
            console.log(&quot;title      : &quot; + e.title);
            console.log(&quot;author     : &quot; + e.author);
            console.log(&quot;description: &quot; + e.description);
          });
        }
      }
    });
    &lt;/code&gt;&lt;/pre&gt;
    
    &lt;p&gt;But that means you&#39;re relient on them being online and reachable.&lt;/p&gt;
    
    &lt;hr&gt;
    
    &lt;h1&gt;Building Content&lt;/h1&gt;
    
    &lt;p&gt;Once you&#39;ve successfully extracted the information you need from the feed, you need to create document fragments containing the elements you&#39;ll want to inject to display your data.&lt;/p&gt;
    
    &lt;hr&gt;
    
    &lt;h1&gt;Injecting the content&lt;/h1&gt;
    
    &lt;p&gt;Select the container element that you want on the page and append your document fragments to it, and simply use innerHTML to replace its content entirely.&lt;/p&gt;
    </summary>
        </entry></feed>
    

    Executions

    Using jQuery’s Built-in XML Support

    Invoking:

    $.get('https://stackoverflow.com/feeds/question/10943544', function (data) {
        $(data).find("entry").each(function () { // or "item" or whatever suits your feed
            var el = $(this);
    
            console.log("------------------------");
            console.log("title      : " + el.find("title").text());
            console.log("author     : " + el.find("author").text());
            console.log("description: " + el.find("description").text());
        });
    });
    

    Prints out:

    ------------------------
    title      : How to parse a RSS feed using javascript?
    author     : 
                Thiru
                https://stackoverflow.com/users/1126255
    
    description: 
    ------------------------
    title      : Answer by haylem for How to parse a RSS feed using javascript?
    author     : 
                haylem
                https://stackoverflow.com/users/453590
    
    description: 
    

    Using jQuery and the Google AJAX APIs

    Invoking:

    $.ajax({
      url      : document.location.protocol + '//ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' + encodeURIComponent('https://stackoverflow.com/feeds/question/10943544'),
      dataType : 'json',
      success  : function (data) {
        if (data.responseData.feed && data.responseData.feed.entries) {
          $.each(data.responseData.feed.entries, function (i, e) {
            console.log("------------------------");
            console.log("title      : " + e.title);
            console.log("author     : " + e.author);
            console.log("description: " + e.description);
          });
        }
      }
    });
    

    Prints out:

    ------------------------
    title      : How to parse a RSS feed using javascript?
    author     : Thiru
    description: undefined
    ------------------------
    title      : Answer by haylem for How to parse a RSS feed using javascript?
    author     : haylem
    description: undefined
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to parse this php xml response in android: <?phpxml version=1.0 encoding=utf-8?> <SmsResponse>
I need to parse an RSS feed using PHP but the server only has
I just implemented a version of Peter Bromberg's RSS feed parser. Now, I need
I'm trying to parse a RSS feed using C#, and I need to transform
I am using Xelement - Linq to XML to parse some an RSS feed.
I need to parse the Yahoo Weather RSS feed for a place, like http://weather.yahooapis.com/forecastrss?w=44418&u=c
I need to parse a bunch of incoming xml documents, they all have the
I need to parse html for a project and looking for a good html
I am trying to parse an rss feed that is using the well formed
Ok guys.. I have a HTML i need to parse into a php script

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.