不知道怎么回事,我生成的XML文件里中文都是乱码
高手指点下,谢谢!!

解决方案 »

  1.   

    <?xml version='1.0' encoding='GB2312' ?>
    <document Name='è&iexcl;&#338;&aelig;”&iquest;&auml;&ordm;&#8249;&auml;&cedil;&#353;&aelig;€§&aelig;”&para;è&acute;&sup1;è&reg;&cedil;&aring;&#143;&macr;è&macr;&#129;'><&aelig;&shy;&pound;&aelig;&#339;&not;><è&macr;&#129;&aring;&#143;·>202334</è&macr;&#129;&aring;&#143;·>这是中间的一段
      

  2.   

    头部改为<?xml version="1.0" encoding="utf-8"?>
      

  3.   

    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <?xml version="1.0" encoding="utf-8: standalone="yes"?>
    <?xml version="1.0" encoding="UTF-8" ?>  
    这都试过,都不行
      

  4.   

    你是用什么工具生成的?我用.net dom实现,很好的。<?xml version="1.0" encoding="utf-8"?>
    <filelist>
      <file filename="200502公共频道编辑线机房排班表.xls">
        <filesize>15872字节</filesize>
        <author>沈聪</author>
        <uploadate>2006-02-23 16:59:36</uploadate>
        <filepath>photo/200502公共频道编辑线机房排班表.xls</filepath>
      </file>
      <file filename="200510卫视编辑线机房排班表.xls">
        <filesize>13824字节</filesize>
        <author>沈聪</author>
        <uploadate>2006-02-23 13:54:06</uploadate>
        <filepath>photo/200510卫视编辑线机房排班表.xls</filepath>
      </file>
      <file filename="200511.xls">
        <filesize>13824字节</filesize>
        <author>沈聪</author>
        <uploadate>2006-02-23 16:52:18</uploadate>
        <filepath>photo/200511.xls</filepath>
      </file>
      <file filename="200512.xls">
        <filesize>13824字节</filesize>
        <author>沈聪</author>
        <uploadate>2006-02-23 16:53:06</uploadate>
        <filepath>photo/200512.xls</filepath>
      </file>
      <file filename="200511卫视编辑线机房排班表.xls">
        <filesize>10752字节</filesize>
        <author>沈聪</author>
        <uploadate>2006-02-23 16:55:02</uploadate>
        <filepath>photo/200511卫视编辑线机房排班表.xls</filepath>
      </file>
      <file filename="200508卫视编辑线机房排班表.xls">
        <filesize>13824字节</filesize>
        <author>沈聪</author>
        <uploadate>2006-02-23 16:59:54</uploadate>
        <filepath>photo/200508卫视编辑线机房排班表.xls</filepath>
      </file>
    </filelist>
      

  5.   

    对了,你的根xml文档中怎么没有根节点???
      

  6.   

    什么也不设试一下,还有你的查勘XML文件的工具是什么,EditPlus?
    换其他的文本编辑工具看一下是什么效果!
      

  7.   

    把你生成xml的代码贴出来
    是doc.save还是用StreamWriter之类的写的?
    如果是后者你得注意编码