In the <head> section of my HTML document, I have linked an XML file:
<link id="data" type="text/xml" href="Data.xml" />
I would like to read the contents of this file via JavaScript, but I can't even seem to get access to the contents of the file.
I tested it this way:
<script type="text/javascript">
var link = document.getElementById("data");
document.write(link.innerText);
document.close();
</script>
What should I try next?
P.S. ...Can't use AJAX for this since it's all local files.