My goal is to read in a file test.xml which is in the same folder as my index.html.
I know that I can pull in script files with something like <script src="index.js></script>
, but is there a way for me to do the same with an xml file <xml src="test.xml"><xml>
.
I do not want to use the AJAX XMLHttpRequest because the index.html may not be hosted on an http server, but instead opened like a normal file in chrome.
Do I have any options when it comes to opening up this xml file, or will it have to be hosted on a http server? I guess another option would be to store the whole xml file inside of a javascript variable, but this seems unnecessary.