//function which loads an XML and convert to javascript object
function loadXMLDoc(dname)
{
var xmlDoc;
if (window.XMLHttpRequest)
  {
  xmlDoc=new window.XMLHttpRequest();
  xmlDoc.open("GET",dname,false);
  xmlDoc.send("");
  //alert("xml res"+xmlDoc.responseXML);
  return xmlDoc.responseXML;
  }
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load(dname);
  return xmlDoc;
  }
alert("Error loading document");
return null;
}

function ProcessXML()
{
      xmlDoc = loadXMLDoc("./employee.xml");
      empArr = xmlDoc.getElementsByTagName("employee");
      //alert(empArr.length);
      return empArr; 
}
