Hello i am new in XML HTTP request. and I am trying a code to load an XML file but didnt get the desired outcome.
code is : `<script> if (window.XMLHttpRequest) { var xhttp=new XMLHttpRequest(); } var url="../src/employee.xml"; xhttp.open('GET',url,true); xhttp.send(); xmlDoc=xhttp.responseXML; document.write("XML document loaded into an XML DOM Object."); </script> </body> </html>` employee is an xml file in the src folder which is <?xml version="1.0" encoding="utf-8"?> <employee> <branch="cse"> <name>Rahul</name> <age>21</age> </branch> </employee>
Thank You in advance.