//urlxml 为å符串形å¼xml
function callBackFun(urlxml,uname,utel,uemail){
// alert(urlxml+" | "+uname+" | "+utel+" | "+uemail);
var xml = anaXml(urlxml);
var pic = '';
var mes = anaXml(urlxml).getElementsByTagName_r("item");
for(var i=0;i < mes.length; i++){
if(mes[i].attributes["id"].value == "imageUrl"){
pic = mes[i].firstChild.nodeValue;
// alert(mes[i].firstChild.nodeValue);
}
}
}
function closeFun(){
alert("å
³é");
}
function anaXml(xmlString){
var xmlDoc=null;
//å¤ææµè§å¨çç±»å
//æ¯æIEæµè§å¨
if(!window.DOMParser &&
window.ActiveXObject){ //window.DOMParser
å¤ææ¯å¦æ¯éieæµè§å¨
var
xmlDomVersions =
['MSXML.2.DOMDocument.6.0','MSXML.2.DOMDocument.3.0','Microsoft.XMLDOM'];
for(var
i=0;i < xmlDomVersions.length; i++){
try{
xmlDoc = new
ActiveXObject(xmlDomVersions[i]);
xmlDoc.async = false;
xmlDoc.loadXML(xmlString);
//loadXMLæ¹æ³è½½å
¥xmlå符串
break;
}catch(e){
}
}
}
//æ¯æMozillaæµè§å¨
else if(window.DOMParser &&
document.implementation &&
document.implementation.createDocument){
try{
domParser = new
DOMParser();
xmlDoc =
domParser.parseFromString(xmlString, 'text/xml');
}catch(e){
}
}
else{
return
null;
}
return xmlDoc;
}
温馨提示:内容为网友见解,仅供参考