| 发表于:2008-01-13 01:36:391楼 得分:0 |
用string xmltext(xmloptions options) just like xmltext() but with options. options map may be null. note that this method does not produce xml with the xml declaration, including the encoding information. xmloptions opts = new xmloptions(); opts.setsaveprettyprint(); opts.setsaveprettyprintindent(4); system.out.println(xobj.xmltext(opts)); the alternative is single-line usage: system.out.println(xobj.xmltext(new xmloptions().setsaveprettyprint().setsaveprettyprintindent(4))); | | |
|