XMLhttp request is not loading

Fritz14

New Member
Hello i am new in XML HTTP request. and m trying a code to load an XML file but didnt get the desired outcome.\[code\]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>`\[/code\]employee is an xml file in the src folder which is \[code\] <?xml version="1.0" encoding="utf-8"?> <employee> <branch="cse"> <name>Rahul</name> <age>21</age> </branch> </employee> \[/code\]
Thank You in advance.
 
Back
Top