$.getJSON or $.ajax alternative for XML retrieval

hghuth2rur

New Member
I've started to work on a private project. However, in the first stage, I am already facing a problem.[*]The returned data is in XML format (not that bad, but takes a lot of effort to parse to usable objects)[*]The remote server doesn't accept any ORIGIN except for himself, so the browser throws the error: Origin * is not allowed by Access-Control-Allow-Origin.
  • the (*) could either be null, localhost, or my website.
So I have been searching, but unable to find any results.It appears that there is no alternative for the jsonp argument when using \[code\]$.ajax\[/code\], and the name \[code\]$.getJSON\[/code\] is as it says, meant to retrieve \[code\]JSON\[/code\], not \[code\]XML\[/code\].So I'm wondering, if there is any other alternative method to retrieve the external XML data while disabling the ORIGIN property when sending the request?I've noticed it is possible to obtain the contents with the PHP function: file_get_contents. But I'd really like to know if there is a different way using JQuery.And if anyone knows how I could let JQuery communicate with the returned PHP file contents, please feel free to enlight me :']
 
Top