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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:28:44+00:00 2026-06-06T12:28:44+00:00

Google’s feed loader appears to be ignoring attributes when converting to JSON. I’m using

  • 0

Google’s feed loader appears to be ignoring attributes when converting to JSON.
I’m using jQuery to grab a feed via AJAX.
The actual RSS XML feed can be seen here, and the response from the AJAX call can be seen here.

I need to access the urlattribute of the <enclosure> tags, but neither appear in the response.

For reference, the code I am using is:

function getFeed(url) {
    url = 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=10&callback=?&q=' 
            + encodeURIComponent(url);
    $.ajax({
        type: 'GET',
        url: url,
        dataType: 'jsonp',
        cache: false,
        success: function(d) { alert(JSON.stringify(d); },
        error: function(s,x) { alert(x); }
    }); 
}

I can’t figure out how to get an XML response instead, as changing dataType : 'xml' causes an HTTP error. JSON is preferable.

Any ideas?

  • 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-06T12:28:46+00:00Added an answer on June 6, 2026 at 12:28 pm

    The ‘enclosure’ tag is not included in the JSON response, so you have two options setting the output argument:

    You need to set the output to ‘XML’: https://developers.google.com/feed/v1/jsondevguide#json_args

    url = 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&output=xml&num=10&callback=?&q='+ encodeURIComponent(url); 
    

    Or use the mixed format: https://developers.google.com/feed/v1/devguide#resultMixed

    url = 'http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&output=json_xml&num=10&callback=?&q='+ encodeURIComponent(url); 
    

    You´ll get the JSON plus a a new xmlString property with all the tags (including ‘enclosure’ attributes)

    alert(d.responseData.xmlString);
    

    In both cases you need to parse the XML string and navigate to the needed info

    Hope this helps

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

Sidebar

Related Questions

Google Chrome appears to proactively enforce client-side validation. Here is an example of what
Google returns Unparsable Cuft to the json response like this: throw 1; <dont be
Google allows you to load jQuery asynchronously like so: <script src=http://www.google.com/jsapi?key=... type=text/javascript></script> <script> //<![CDATA[
Google/MyBrain are failing me. Without using a framework (which I'll never get past my
I'm making a simple page using Google Maps API 3. My first. One marker
Google offers a wonderful REST interface for geocoding and reverse geocoding an address. My
Google App Engine is a cloud computing architecture that supports java based web services
Google returns me just nothing useful on these keywords. But I know there is
Google Images is the best example. Once you follow an image, a frame remains
Google Maps API V3 doesn't support the V2 GOverviewMapControl option, yet. I've come across

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.