解决方案 »

  1.   

    改完文件后你要保存啊,比如  
     SAXReader reader = new SAXReader();
     Document doc = reader.read(is); // is 是xml文件字符流
      
     Element root = doc.getRootElement();
     .......
    //你修改节点的代码
    //主要是这里 修改完后保存 FileWriter out = null;
            try {
                out = new FileWriter(filename);//filename即xml文件的路径名称
                doc.write(out);
            } catch (Exception e) {
               //异常
            } finally {
                if (out != null)
                    try {
                        out.close();
                    } catch (IOException e) {
                    }
            }