姿姿霸霸~~!
贵在坚持!
posts - 106,  comments - 50,  trackbacks - 0
1.写文件并设置encoding
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding("GBK");
output = new XMLWriter(new FileWriter(new File(filename)), format);
output.write(document);

2.先删文件再创建

File file = new File("d://xxx.xml");
  if(file.exists()){
   file.delete();
  }

CreatXml temp = new CreatXml();
temp.createXMLFile("d://xxx.xml")

posted on 2008-08-20 23:50 xrzp 阅读(1214) 评论(0)  编辑  收藏 所属分类: JAVA

只有注册用户登录后才能发表评论。


网站导航:
 

<2008年8月>
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

常用链接

留言簿(4)

随笔分类

随笔档案

好友的blog

搜索

  •  

积分与排名

  • 积分 - 115124
  • 排名 - 505

最新评论

阅读排行榜

评论排行榜