本人初學 XML 有個問題不知道怎麼解決﹐請指教 看这里:http://blog.csdn.net/cds27/archive/2006/08/07/1031262.aspx 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 同学,你没有用过大名鼎鼎的XMLOutputter? org.jdom.Document globalDoc = (org.jdom.Document)session.getAttribute("dom"); System.out.println("******************"); org.jdom.output.Format format = org.jdom.output.Format.getCompactFormat(); format.setEncoding("gb2312"); //设置xml文件的字符为gb2312 format.setIndent(" ");//设置缩进 //format.setExpandEmptyElements(true); org.jdom.output.XMLOutputter xmlOut = new org.jdom.output.XMLOutputter(format); // xmlOut.setEncoding("gb2312");// xmlOut.setNewlines(true);// xmlOut.setIndent(2);// xmlOut.setExpandEmptyElements(true); String xml = xmlOut.outputString(globalDoc);// System.out.println(xml); http://www-128.ibm.com/developerworks/cn/java/j-jdom/ ssh无法删除,大哥大姐帮帮忙吧!!!实在不知道了??? SSH2中,请教action的写法 ssh登录存放用户发布信息 不成功 大家帮我看看这个异常吧 谢谢 double a =1 double b=a/0 这个会报错吗? hibernate 更换数据库怎样指定表空间 表单的提交,页面设置 java中如何切换面板? cloudview不能打开数据库,该怎么解决啊? 关于Maven打包在tomcat7下运行问题 sqoop把数据从mysql导入到hive中报错 web service发布问题 江湖救急啊!Apache+Tomcat系统整合后验证码不能显示的问题??????急啊
System.out.println("******************");
org.jdom.output.Format format = org.jdom.output.Format.getCompactFormat();
format.setEncoding("gb2312"); //设置xml文件的字符为gb2312
format.setIndent(" ");//设置缩进
//format.setExpandEmptyElements(true); org.jdom.output.XMLOutputter xmlOut = new org.jdom.output.XMLOutputter(format);
// xmlOut.setEncoding("gb2312");
// xmlOut.setNewlines(true);
// xmlOut.setIndent(2);
// xmlOut.setExpandEmptyElements(true); String xml = xmlOut.outputString(globalDoc);
// System.out.println(xml);