Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 org.jdom.Document 转换为 Java 中的字符串?
new XMLOutputter().outputString(doc);
我自己得到了答案
XMLOutputter xmOut = new XMLOutputter(); System.out.println("----" + xmOut.outputString(doc));