Commit a1d30c7b by 刘泽奇

123

parent b29c5ede
......@@ -92,6 +92,11 @@ module.exports=
this.$emit('uploadsuccess',{result:this.result,file:file,fileList:fileList,key:this.d.key,flag:this.flag,dataSouce:this.dataSouce});
},
loadXML(xmlString){
console.log(window.DOMParser,"window.DOMParser");
console.log(window.ActiveXObject,"window.ActiveXObject");
console.log(document.implementation,"document.implementation");
console.log(document.implementation.createDocument,"document.implementation.createDocument");
console.log(xmlString,"xmlString");
var xmlDoc=null;
if(!window.DOMParser && window.ActiveXObject){
var xmlDomVersions = ['MSXML.2.DOMDocument.6.0','MSXML.2.DOMDocument.3.0','Microsoft.XMLDOM'];
......@@ -107,8 +112,11 @@ module.exports=
}
else if(window.DOMParser && document.implementation && document.implementation.createDocument){
try{
domParser = new DOMParser();
domParser = new DOMParser();
console.log(domParser,"domParser");
xmlDoc = domParser.parseFromString(xmlString, 'text/xml');
console.log(xmlDoc,"xmlDoc");
}catch(e){
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment