javascript - Retrieve elements from Mailchimp archive RSS -


i'm trying extract titles , descriptions mailchimp rss feed using jquery.

i'm trying with:

$.ajax({     type: 'get',     url: 'http://us10.campaign-archive1.com/feed?u=21a65076da97205b5e5ff33e6&id=cc8bfc765e',     crossdomain: true,     datatype: 'jsonp',     success: function (xml) {         $(xml).find("item").each(function () {             var title = $(this).find("title").text();             var description = $(this).find("description").text();             var linkurl = $(this).find("link_url").text();             var link = "<a href='" + linkurl + "' target='_blank'>read more<a>";             $('#feedcontainer').append('<article><h3>' + title + '</h3><p>' + description + link + '</p>');         });     } }); 

but error:

uncaught syntaxerror: unexpected token < on http://us10.campaign-archive1.com/feed?u=21a65076da97205b5e5ff33e6&id=cc8bfc765e&callback=jquery214010618008393794298_1436280190025&_=1436280190026 

if it's not possible through jquery, there method? tried yahoo developer console robots.txt disallows access..

it seems mailchimp disallow access doesn't come browsers, tried curl url , 404 not found.

  1. you need parse xml before query jquery (https://api.jquery.com/jquery.parsexml)

    var xmldoc = $.parsexml(xml); var $xml = $(xmldoc); $xml.find("item"); 
  2. set valid datatype xml


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -