Extjs中tree动态加载xml问题
在做tree动态加载xml的时候Ext.ux.tree.XmlTreeLoader中的processResponse方法修改为
processResponse : function(response, node, callback) {
var xmlData = response.responseXML;
var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async = false;
xmlDoc.loadXML(response.responseText);
xmlData = xmlDoc;
var root = xmlData.documentElement || xmlData;
try {
node.beginUpdate();
node.appendChild(this.parseXml(root));
node.endUpdate();
if (typeof callback == "function") {
callback(this, node);
}
} catch (e) {
this.handleFailure(response);
}
}
后成功