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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:07:23+00:00 2026-05-24T05:07:23+00:00

I am trying to read two Rss feed urls at regular intervals and display

  • 0

I am trying to read two Rss feed urls at regular intervals and display the latest feed title as a notification inside my android app.

As the setinterval function is being called every 8000 ms I want to make sure there are no duplicate notifications of the same title.

When I do a console.log inside the getrss function I am able to see the xml object, but
I am not able to see any data being outputted for var xml , var entry or var title .
Plese point out were I might be going on.

/* ---------------------- global variables ---------------------- */

    var Rss1_title;
    var Rss2_title;

/* ---------------------- end global variables------------------- */

/* --------- pull latest Rss feed title for first url: ---------- */  

    function update_rss1_feeds(){
    var new_title = getRss("http://yofreesamples.com/category/real-freebies/feed/");
        if(Rss1_title != new_title)

//display the notification

            navigator.notification.alert(
                new_title,  // message
                'New Rss Entry',                 // title
                'New Rss Entry'                  // buttonName
            );

        Rss1_title = new_title;             
    }
/* --------- end : --------- */

/* --------- pull latest Rss feed title for second url: --------- */  

    function update_rss2_feeds(){
    var new_title = getRss("http://yofreesamples.com/category/free-coupons/feed/");
        if(Rss2_title != new_title)

//display the notification

            navigator.notification.alert(
                new_title,  // message
                'New Rss Entry',                 // title
                'New Rss Entry'                  // buttonName
            );

        Rss2_title = new_title;             
    }
/* --------- end : --------- */

This is the getrss function were I parse the Rss feed. I might be doing something wrong over here.

function getRss(url){
if(url == null) return false;

            // Create Google Feed API address
            var api = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=" + encodeURIComponent(url);
            api += "&output=json_xml"

            var newEntry;
            // Send request
            $.getJSON(api, function(data){
                console.log('testdata',data); // the response is xmlobjest
                // Check for error
                if (data.responseStatus == 200) {

                    var feeds = data.responseData.feed;
                    if (!feeds) {
                        return false;
                    }

                    // Get XML data for media (parseXML not used as requires 1.5+)
                    var xml = getXMLDocument(data.xmlString);
                    var xmlEntries = xml.getElementsByTagName('item');
                    var entry = feeds.entries[0];
                    var title = entry.title;
                    console.log('test',title); // it is not being displayed , it seems its not going inside the if statement
                    return title;
                }else {

                };              

            });             

}

This is the Function call.

setInterval('update_rss1_feeds()',7000);
setInterval('update_rss2_feeds()',8000);
  • 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-05-24T05:07:25+00:00Added an answer on May 24, 2026 at 5:07 am

    When I access:

    http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&callback=?&q=[an rss feed url]&output=json_xml 
    

    I get an error “bad or missing callback or context”, if I take our the callback parameter it works fine

    http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=[an rss feed url]&output=json_xml 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to read in two numbers, and display the absolute difference between them.
I'm trying to calculate the similarity (read: Levenshtein distance ) of two images, using
Trying to read an RSS and select information using Linq but can't seem to
I am trying to read in two strings separated by a space. cin>>a; cin>>b;
I'm trying to read a BMP file in Python. I know the first two
I am trying to read Android device contacts in VCard format using Android Api.
I'm trying to read in and parse an xml document in an iPhone app.
I have two classes - Cd and Track which I'm trying to read into
I am trying to read a weather feed from Yahoo to my site. Using
I am trying to read specific data from a file into two 2D arrays.

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.