What should I Change the below code to load XML cross domain using jsonp..
$.ajax({
type: "GET",
url: "http://www.w3schools.com/xml/note.xml",
dataType: "xml",
success: function(xml) {
alert('Hi');
}
});
Hope my problem is resolved.
As far as I know you can’t (directly) load XML data using JSONP.
Cross-site AJAX with JSONP relies on wrapping the required object inside a Javascript function call that’s executed inside a dynamically created
<script>tag, and there’s no mechanism for doing that with XML.Even JSONP requires that the remote server perform the JSON wrapping – a CGI script outputing JSON data doesn’t automatically support JSONP out of the box.
That’s clearly going to be impossible if your data is actually plain XML files sat on an standard FTP server.