Is there a way to load XML Data Cross-Domain with JQuery (= client side)?
$.get('http://otherdomain.com/data.xml', function(xml) { }
The above doesn't work - do I have to rely on JSONP, or is there a way to load XML?
No way to load XML. So yes, using "standard" xmlhttprequests you need JSONpadding.
If the server supports "Cross-Origin Resource Sharing (CORS)" you can easily receive data from a foreign domain. That means, you have to add a custom header into your XmlHttpRequest ('Origin') and the server decides if it does allow the request or not.
You need to use JSONP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With