test.xml文件内容如下: 
<?xml version="1.0" encoding="gb2312"?>
<root>
<student>
    <name>张三</name>
    <age>3</age>
    <sex>男</sex>
</student>
<student>
    <name>李四</name>
    <age>4</age>
    <sex>
        <name>真的不知道名字</name>
    </sex>
</student>
<student>
    <name>王五</name>
    <age>5</age>
    <sex>
        <name>不知道名字</name>
    </sex>
    <sex>
        <name>也不知道名字</name>
    </sex>
</student>
</root>
报错图片如下: 
不好意思各位,我最多只能给100分,系统不充许我给200分,如果哪位帮我解决了问题,我再单独给100谢谢

解决方案 »

  1.   

    Firefox3 + IIS测试没有错误,弹出 '真的不知道名字'
      

  2.   

    装上FireBug后,也出现同样问题
    将firebug禁用后又正常了期待高手 ...
      

  3.   

    我在IE7.0和Firefox3.0没有提示代码错误。
      

  4.   

    http://127.0.0.1/index.html      
    http://127.0.0.1:81/index.html   
    file:///F:/php/index.html 初步怀疑是权限问题问题,f盘是本地权限基本无限大,127.0.0.1估计受到一些限制,曾遇到跟你类似的问题,后来将http://127.0.0.1设置信任站点后,脚本就不报错了
      

  5.   

    大家有的说有问题,有的说没有问题,我最后再解释一次:
    您用firefox浏览器运行脚本,并且必须安装firebug之后,错话才能出来.
    我把程序放在了:http://zzjxyh.cn/test/index.html大家可以访问看一下,
    源码和我在一楼发的源码是一样的,大家看一下报什么错误
      

  6.   

    http://zzjxyh.cn/test/index.html我这里测试这个地址。
    和把你的代码copy到本地都没有问题
      

  7.   

    no error
    ff 2.0.0.15 firebug1.05
      

  8.   

    有时候firebug自己会有错,不关程序的事
      

  9.   

    那程序当中: 
          Document.prototype.__load__ = Document.prototype.load;//更新 
        Document.prototype.load = function(sRUL)//更新Mozilla的load信息 
        { 
            this.__initError__(); 
            this.__changeReadyState__(1); 
            this.__load__(sRUL); 
        } 
    这段话就没有作用了,如果前面没有用如下的代码: 
      //在这里加上下面这段话就行了 
        if (typeof XMLDocument != "undefined") { 
            Document = XMLDocument; 
        } else if (typeof Document != "undefined") { 
            Document = Document; 
        }
      

  10.   

    那程序当中: 
          Document.prototype.__load__ = Document.prototype.load;//更新 
        Document.prototype.load = function(sRUL)//更新Mozilla的load信息 
        { 
            this.__initError__(); 
            this.__changeReadyState__(1); 
            this.__load__(sRUL); 
        } 
    这段话就没有作用了,如果前面没有用如下的代码: 
      //在这里加上下面这段话就行了 
        if (typeof XMLDocument != "undefined") { 
            Document = XMLDocument; 
        } else if (typeof Document != "undefined") { 
            Document = Document; 
        }