This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates 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