JS Open XML
//针对两种浏览器,分别获取xmlDocument对象
function loadXML(xmlFile) { var xmlDoc; if(window.ActiveXObject) { xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async=false; xmlDoc.load(xmlFile); } else if(document.implementation&&document.implementation.createDocument){ xmlDoc=document.implementation.createDocument( "", "",null); xmlDoc.async=false; xmlDoc.load(xmlFile); } else{ alert('Your browser cannot handle this script'); } return xmlDoc; }