xml转换String输出

System.out.println("workflowSend ############# start ");
try {
Format format = Format.getPrettyFormat();
//format.setEncoding("gb2312");//����xml�ĵ����ַ�Ϊgb2312�������������
XMLOutputter xmlout = new XMLOutputter(format);
ByteArrayOutputStream bo = new ByteArrayOutputStream();
xmlout.output(doc, bo);
String xmlStr = bo.toString();
System.out.println("xmlStr:\r\n"+xmlStr);
} catch (Exception e) {
}

System.out.println("workflowSend ############# end");

posted on 2013-03-25 16:10  anuo_ruibo  阅读(227)  评论(0编辑  收藏  举报

导航