以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  保存xml乱码又出来了,救命呀  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=5696)


--  作者:光明圣殿
--  发布时间:3/17/2004 5:32:00 PM

--  保存xml乱码又出来了,救命呀
我在xml添加一个节点
       Attribute name = new Attribute("name","测试亚");
       Element item = new Element("Item").setText("40").addAttribute(name );
       root.addChild(item);
       XMLOutputter outp = new XMLOutputter("",false, "gb2312");
       outp.output(doc, new FileOutputStream("data.xml"));
      我转码了,咋还乱码
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
2,011.719ms