解决方案 »

  1.   

        下面红色的 有错 他说未定义实体 CT lm == 
      

  2.   

      我要下面没红色 我xml文件保存的是我需要的路径·  
      

  3.   

    XML对&敏感,换了这个标记
    实际上,在XML文件中被禁止使用的ASCII字符共有五个:
    &lt;  < 小于 
    &gt; > 大于 
    &amp; &  和 
    &apos; ' 单引号 
    &quot; " 双引号 
      

  4.   


    public static final String tryXML(String input) {
                     if (input == null) {
                          input = "";
                         return input;
                     }
                     input = input.trim().replaceAll("&", "&amp;");
                     input = input.trim().replaceAll("<", "&lt;");
                     input = input.trim().replaceAll(">", "&gt;");
                     input = input.trim().replaceAll("'", "&apos;");
                     input = input.trim().replaceAll("\\\"", "&quot;");
                     return input;
           }
    用这个函数替换吧。