把encoding="utf-8"?>试下
现在没有空
晚上再帮你看吧

解决方案 »

  1.   

    你用什么方法读的?我用下面的方法没有出错:
     XMLDocument1.loadFromXMl('<?xml version="1.0" encoding="gb2312"?> '+
    '<note>??愂ě???簷?????砷????</note> ');
    XMLDocument1.Active := true ;
    Memo1.Lines.Add(XMLDocument1.DocumentElement.Text);
      

  2.   

    我是用下面的方法读的:
        XMLDocument.FileName := 'aa.xml';
        XMLDocument.Active := true;
    第二条语句就出错了,我用的是Delphi6。
      

  3.   

    encoding为utf-8,utf-16等我都试过了没用。我是用下面的方法读的:
        XMLDocument.FileName := 'aa.xml';
        XMLDocument.Active := true;
    第二条语句就出错了,我用的是Delphi6。
      

  4.   

    原来那个文件没有问题不好意思,看看这个文件:
    <?xml version="1.0" encoding="gb2312"?>
    <Record>
    <time>02-06-22 12:59:38</time>
    <note>??愂ě???簷?????砷????</note>
    </Record>
    XMLDocument.Active 设为True时便会出错。