This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
setDocType() doesn't work! The result file hasn't any doctype! Code like below: JDOMSource source = new JDOMSource(new org.jdom.Document(root).setDocType(docType)); StreamResult result = new StreamResult(file); TransformerFactory.newInstance().newTransformer().transform(source,result); //docType is not null and the root element don't have docType