JQuery xml url?
JQuery xml url?
Hi all,
I want to parse an xml file using jquery. Everything seems to be fine if the url of the xml file is at the same directory level of the html that processes it.
Problem is that the xml is in a remote server.
Here is the code I use:
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
type: "GET",
url: "http://127.0.0.1/myxml.xml",
//This would work: url: "myxml.xml",
dataType: "xml",
success: function(xml)
{
alert('It is working!... now parse the xml...');
},
error: function()
{
alert('There is some error');
}
});
});
</script>
This will always make an error. Is there something I'm missing?
Thanks in advance
Regards.