0
我想在IE和其他瀏覽器中完美地運行dojo(Ajax)來解析XML。由於編碼原因在IE中出現dojo(Ajax)錯誤的XMl解析
例的JavaScript道場:
ar xhrArgs = {
url: link,
sync:true,
preventCache:true,
load: function(responseresponse,ioArgs){
var dom = dojox.xml.parser.parse(responseresponse);
var docNode = dom.documentElement;
}
error: function(error){
alert("An unexpected error occurred: " + error);
//IN IE go to here if the XML have characters like this áéí an others
}
示例XML:
<?xml version=\1.0\ encoding=\ISO-8859-1\ ?>
<xml>
<accountNumber>áéíóú</accountNumber>
</xml>