Search code examples
javascriptxmlrssfeedgoogle-feed-api

Extracting XML data from a link with JavaScript?


I'm trying to extract the data from this link:

http://212.12.182.204:8090/NewsService.svc/LatestNews

although I get the error message:

the port specified in the feed url is not supported

The code I'm using works with any other link but not working with my link, all the codes I've searched for do the same, Here's the last code:

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);
    }
});
}

any ideas? thx


Solution

  • The problem you have is that the Google Feeds API does not support HTTP ressources on port 8089. If you are (or know) the publisher of the feed, you should probably serve that feed on port 80. If not give a shot to another tool like Superfeedr, for example, which has no port restriction.