用XMLOutputter out = new XMLOutputter();
out.outputString(doc);
或者doc.toString()看是否可以