Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Someone family with JDom please come in!  RSS feed

 
Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not quite the right forum for this type of question.
Reminder: XML is not an objective of the SCJP exam
Moving this to XML, XSL, DOM and SAX
 
Sam Wang
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But too few experts at JDom in this topic!!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!