Code:
var xmlhttp = new XMLHttpRequest(); // You must Initialize
xmlhttp.open("GET","x.xml",false); // async is false, which is fine, but try async sometime
xmlhttp.send(); // no need for null
var x=xmlhttp.responseXML.getElementsByTagName("Student"); // only need one variable
for(var i=0,j=x.length;i<j;i++){ // DECLARE VARIABLE if "i" is defined in window then it'll be overwritten
Code in for loop should be fine
}
When it comes to reponseXML your XML MUST be VALID to your browser expecially. This code was tested on Chrome 22.