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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:52:20+00:00 2026-06-11T09:52:20+00:00

I am using GoogleFeed API ( https://developers.google.com/feed/ ) to retrieve RSS feeds using this

  • 0

I am using GoogleFeed API (https://developers.google.com/feed/) to retrieve RSS feeds using this code:

    function loadAuto(){
    google.load("feeds", "1");  
    function initialize() {
        var feed = new google.feeds.Feed("http://www.automoto.sk/rss");
        feed.setNumEntries(window.localStorage.getItem("entriesNumber"));
        feed.load(function(result) {
            if (!result.error) {
                var feedlist = document.getElementById("feedAuto");
                for (var i = 0; i < result.feed.entries.length; i++) {
                    var li = document.createElement("li");
                    var entry = result.feed.entries[i];
                    var A = document.createElement("A");
                    var descriptionSettings = window.localStorage.getItem("descriptionSettings");
                    if (descriptionSettings=="true"){
                        var h3 = document.createElement("h3");
                        var p = document.createElement("p");
                        var pDate = document.createElement("p");
                        pDate.setAttribute("style","text-align: right; margin-top: 5px;");
                        var publishedDate = new Date(entry.publishedDate);
                        publishedDateConverted = convertTime(publishedDate);
                        pDate.appendChild(document.createTextNode(publishedDateConverted));
                        h3.setAttribute("style","white-space: normal;")
                        h3.appendChild(document.createTextNode(entry.title));
                        p.setAttribute("style","white-space: normal;")
                        p.appendChild(document.createTextNode(entry.content));
                        A.setAttribute("href",entry.link);
                        A.appendChild(h3);
                        A.appendChild(p);
                        A.appendChild(pDate);
                        }
                    else{
                        A.setAttribute("href",entry.link);
                        A.appendChild(document.createTextNode(entry.title));
                    };
                    li.appendChild(A);
                    feedlist.appendChild(li);
                }
                $("#feedAuto").listview("refresh");
            }
        });
    }
    google.setOnLoadCallback(initialize);
};

Everything is working fine but I cant load one elemenet. This is RSS structure:

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
   <title>automoto.sk</title>
   <link>http://www.automoto.sk</link>
   <description>automoto.sk</description>   
   <language>sk</language>
   <image><title>automoto.sk</title><url>http://img.automoto.sk</url><link>http: //www.automoto.sk</link></image>
   <pubDate>Thu, 13 Sep 2012 12:22:45 +0200</pubDate>
    <item>
     <title><![CDATA[Nová Kia pro_ceed: Najdynamickejší Slovák]]></title>
     <link>http://www.automoto.sk/clanok/188988/nova-kia-pro-ceed-najdynamickejsi-slovak</link>
     <pubDate>Thu, 13 Sep 2012 09:22:00 +0200</pubDate>
     <guid isPermaLink="false">5e14ddbf095fe497eaf03f9a8cd88773</guid>
     <description><![CDATA[PARÍŽ 2012    Trojdverový variant druhej generácie typu cee’d má podstatne štipľavejší dizajn ako jeho praktickejší brat.]]></description>
     <enclosure url="http://img.automoto.sk/img/20/title/1395542-img-nova-kia-pro-ceed.jpg" length="0" type="image/jpeg"></enclosure>
    </item>
</rss>

I need to load img located in enclosure but I dont know how to load enclosure url variable. Maybe changing the format to XML would do it. I have already tried to change it to XML but I couldnt get it to work. So please if you know how to load the image in JSON format or if you know how to convert initialize() function so it will be working with XML and then load img URL please post your suggestion.

PS: you can find RSS at this site http://www.automoto.sk/rss/

  • 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-11T09:52:22+00:00Added an answer on June 11, 2026 at 9:52 am

    I have got it to work using Mixed Format. So my code changed like this:

    var feed = new google.feeds.Feed("http://www.automoto.sk/rss");
    feed.setResultFormat(google.feeds.Feed.MIXED_FORMAT);
    

    and then I added this:

    var entryImageUrl = entry.xmlNode.getElementsByTagName("enclosure")[0].getAttribute("url");
    

    inside for cycle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Google feed API to load rss in my website. The Procedure
I'm actually using the jQuery Google Feed Plugin to manually add some feeds to
am currently using google feed api to get feed links dynamically. am trying to
I'm using JAXB to generate XML that is uploaded to our Google feed. While
I'm writing a jQuery plugin for work which pulls in RSS feed data using
I have inherited a piece of Javascript that uses the Google Feed API. It
Using rubular.com as a guide, I am trying to get this expression to work
I am running and using the zRSSFeed jQuery plugin (http://www.zazar.net/developers/zrssfeed/) to pull feed items
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly

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.