//定义一个函数getXmlDocument();
function getXMLDocument(){
var xDocument=null;
if(document.implementation && document.implementation.createDocument(){
xDocument=document.implementation.createDocument(" "," ",null);//Mozilla
}else if (typeof ActiveXOBject !="undefined"){
var maXmlAx==null;
try{
msXmlAx=new ActiveXObject("Msxml2.DOMDocument");//newIE
}catch(e){
msXmlAx=new ActiveXObject("Msxml.DOMDocument");//oldIE
}
xDocument=msXmlAx;
}
if(xDocument==null || typeof xDocument.load=="undefined") {
xDocument=null;
}
return xDocument;
}