I am getting data from xml file when I download xml file on local server it is working fine, but when I am giving online path of xml file it is not working. I read about something about that I think it is a crossdomain issue, but how to call crossdomain file in html .
<script type="text/javascript">
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","http://www.mydomain.com./myfile/xml_9646.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
</script>
If the server implement CORS you can
https://stackoverflow.com/a/10083975/295783