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 7963665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:39:33+00:00 2026-06-04T05:39:33+00:00

I am using a script to load news from different sources, using Google AJAX

  • 0

I am using a script to load news from different sources, using Google AJAX feed API. How can I get the description of an entry? Below is an hello world program:

<html>
  <head>
    <script type="text/javascript" src="https://www.google.com/jsapi"></script>
    <script type="text/javascript">

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

    function initialize() {
      var feed = new google.feeds.Feed("http://news.google.com/?output=rss");
      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);

    </script>
  </head>
  <body>
    <div id="feed"></div>
  </body>
</html>

How can I get the description using the entry object??? I am using the google URL – http://news.google.com/?output=rss for RSS feeds in XML format. I want the “Description” part. How can I get that

  • 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-04T05:39:34+00:00Added an answer on June 4, 2026 at 5:39 am

    You can get the description, but you can’t use the JSON format and the entry object to do it. If you read the feed parameters at https://developers.google.com/feed/v1/devguide carefully, you’ll see that description is not a field it returns at the entry level – just at the feed level.

    To do it, you need to request the feed in XML format, and then load the individual nodes, including description. Here’s the relevant snippet I’ve used to do it – change the formatting etc. as you need.

    function initialize() {
       var feed = new google.feeds.Feed("http://myblog.com/blog/feed/");
       feed.setResultFormat(google.feeds.Feed.XML_FORMAT);
       feed.load(function(result) {
       if (!result.error) {
        var items = result.xmlDocument.getElementsByTagName('item');
        item = items[0];
    
        //build each element
        var title = document.createElement("h4");
        title.innerHTML = item.getElementsByTagName('title')[0].firstChild.nodeValue;
    
        var content = document.createElement("p");
        content.innerHTML = item.getElementsByTagName('description')[0].firstChild.nodeValue;
    
        href = item.getElementsByTagName('link')[0].firstChild.nodeValue;
       }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the Google AJAX Feed API to search for a RSS feed. It
I'm using a ajax script to load content from other pages, without having to
OK, i have this jQuery script using ajax to load a response from a
I'm using labjs to load my scripts. I've got a script from feedburner which
I am currently using this script to get new data every second from record_count.php
I have a script that drops a load of tables using DROP TABLE IF
I have a script on jquery that load some site in iframe using: $(#demo_frame).attr('src',
After loading a PHP template (using jQuery's load function), this simple script won't make
This is the file I'm using $.load() to load into DOM: <script type=text/javascript> $('.close').click(function()
I'm using a script to move files from one directory to another. It's also

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.