jquery读取解析本地XML
/**
读取本地XML
add by sufj 2011-8-31
*/
/*兼容ie,ff,chrome*/
function loadXmlFile(xmlFile){
? ?var xmlDom = null;
? ?if (window.ActiveXObject){
? xmlDom = new ActiveXObject('MSXML2.DOMDocument.3.0');
? xmlDom.async=false;
? xmlDom.load(xmlFile);
? ?}else if (document.implementation && document.implementation.createDocument){
? var xmlhttp = new window.XMLHttpRequest();
? xmlhttp.open("GET", xmlFile, false);
? xmlhttp.send(null);
? xmlDom = xmlhttp.responseXML;
? ?}else{
xmlDom = null;
? ?}
? ?return xmlDom;
}