写入xml时出现乱码!写入xml时出现乱码问题,我用的是org.apache.crimson,tree.XmlDocument 来写入的,请问我用utf-8怎么来转换,等~~~[解决办法]写入之前,把String new一下 例如 String str = "你好 "; str = new String(str.getBytes( "ISO8859-1 "), "UTF-8 ");[解决办法]记得dom4j可以确定写入的是什么格式,我想你那api中也应该有吧