File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Someone family with JDom please come in! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Someone family with JDom please come in!" Watch "Someone family with JDom please come in!" New topic
Author

Someone family with JDom please come in!

Sam Wang
Ranch Hand

Joined: Jul 17, 2001
Posts: 95
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


SCJP(2001)
Valentin Crettaz
Gold Digger
Sheriff

Joined: Aug 26, 2001
Posts: 7610
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


SCJP 5, SCJD, SCBCD, SCWCD, SCDJWS, IBM XML
[Blog] [Blogroll] [My Reviews] My Linked In
Sam Wang
Ranch Hand

Joined: Jul 17, 2001
Posts: 95
But too few experts at JDom in this topic!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Someone family with JDom please come in!