프로그래밍/ETC
[XML] jdom 출력 시 출력 포맷 설정하기
galad
2010. 11. 24. 13:10
out = new FileOutputStream(file); XMLOutputter serializer = new XMLOutputter(); // jdom output format Format f = Format.getPrettyFormat(); // output 출력 포맷 - pretty format : whitespace beautification with 2-space indents, uses the UTF-8 encoding 등 serializer.setFormat(f); serializer.output(xmlDoc, out); out.flush(); |
http://www.jdom.org/docs/apidocs/index.html