Note: This is all Client Side
I am trying to upload a XML file and show the value in a text input. I am trying to use AJAX to post the file. It works fine in Firefox but it's not working in Chrome and IE. Chrome shows the error below:
XMLHttpRequest cannot load file:///C:/fakepath/data.xml. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.
Demo: https://jsfiddle.net/6bgzgz0z/
<cats>
<cat id='output'>
<name>George</name>
<gender>male</gender>
<color>white-mustard</color>
<age>5 years</age>
</cat>
<cat id='output1'>
<name>Pety</name>
<gender>female</gender>
<color>white-black-mustard</color>
<age>3</age>
</cat>
</cats>
Above is the XML I am trying to upload but not getting the results.
Note: Everything is supposed to be Client Side