167168169170171172173174175176177
+ "]>\n" + "<root />"; Builder builder = new Builder(); Document tempDoc = builder.build(temp, null); DocType doctype = tempDoc.getDocType(); doctype.detach(); doc.setDocType(doctype); System.out.println(doc.toXML()); }