数据格式错误,比如里面有中文,encoding写utf-8,你的xml文件也得存为utf-8格式。

解决方案 »

  1.   

    试了一下,还不行。不知道是要转Ajax.php的编码?还是要转哪个编码?转成UTF-8?还请孟子老师再指点。
      

  2.   

    编码问题
    function parseXML()
    {
    if (http_request.readyState == 4) {
    if (http_request.status == 200) {
    var xmldoc = http_request.responseXML;
    alert(http_request.responseText)
    alert(xmldoc.loadXML(http_request.responseText))
    alert(xmldoc.parseError.reason)
    var root_node = xmldoc.getElementsByTagName('accountInfo').item(0);
    alert(root_node.childNodes[0].text);

    } else {
    alert('There was a problem with the request.');
    }
    }
    }