0

I want get xml data by across domain, so in the $.ajax method I set the dataType to jsonp(the crossDomain parameter is useless),just like:

app.getData = function (url) {
    $.ajax({
        type: "get",
        url: url,
        dataType : "jsonp",
        crossDomain: true,
        success: function (xml) {
            console.log('data', xml);
            //var data = $.parseXML(xml);
            //console.log('data', data);
        }
    })
} 

Good news is I can get the data correctly, through check the HttpRequest response data.Bad news is the xml I get can not be print or parse through browser or javascript.

So how can I get and print the data?

hh54188
  • 14,887
  • 32
  • 113
  • 184

0 Answers0