<?xml version="1.0" encoding="utf-8"?>
更改为如下:
<?xml version="1.0" encoding="gb2312"?>
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding(" gb2312");file = new File(configHandler.getExportPath() + "/" + fileName);
FileWriter fw = new FileWriter(file);
output = new XMLWriter(fw, format);
output.write(document);