Hi,

> My interest in the DocumentType node is that at present, a newly created 
> document gets written to file without a DTD specified.  It is better to 
> specify the DTD, so that the likes of the W3C Validator can confirm that 
> the document has been generated correctly.
> 
> As a workaround, I convert my DOM to JDOM before writing this to file 
> (IMHO, JDOM is a lot easier to use anyway) and JDOM lets me set the 
> document type node before writing the file.

Another trick is once the DOM is serialized into String / StringBuffer /
File, append the DocumentType on the first line of the String /
StringBuffer / File.

Regards
Tonny Kohar
-- 
Sketsa 
SVG Graphics Editor
http://www.kiyut.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to