Fetching XML from Cross Domain (CORS)

Thinking of fetching an information from cross-domain (CORS)?? An effective option is JSONP but it depends on the fact that the received information is in JSON format. Now, imagine a scenario where the information is received from third party using cross-domain call is in XML format. So, chances are you would get the response from that cross-domain but since the received format is not actually JSON, you can either get response in error() block with following reasons:

or

YQL Web Service can help you to tackle this scenario. You can use below method to make such cross-domain call and effectively fetch your XML.

I used this method to call Scribd API which actually return information as XML and the above method proved quite interestingly effective.

Enjoy!!