Does this help ?
xmlhttp.open("GET", "employee.XML", false);
xmlhttp.send(null);
if (xmlhttp.status==200)
{ xmlDoc = xmlhttp.responseXML;
var empid= xmlDoc.getElementsByTagName("emp");
var total = placeMarks.length;
var names = xmlDoc.getElementsByTagName("Name");
var designation= xmlDoc.getElementsByTagName("designation");
var phone= xmlDoc.getElementsByTagName("phone"); ..... ; }
else
if (xmlhttp.status==404) { alert("XML could not be found");
}