OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to insert the <!DOCTYPE... when creating an XML-File with jaxp anddom



Hello,

I tried this to get the <!DOCTYPE .. declaration in an xml-file I produced with dom and jaxp - unfortunetaly it does not work: 
...
 DOMImplementation domimp = docbuilder.getDOMImplementation();
       DocumentType doctype = domimp.createDocumentType("foo", "url", "mydtd.dtd");
      Document xmlneu =  domimp.createDocument("url", "foo", doctype);

The Doctype-Declaration is still missing when I create a xml-file.
Could you please show me the right code to do so?
Thanks for your help!
Inga

Mit freundlichen Grüssen von
Inga Eckermann
ProFI Consult Gesellschaft für Unternehmensberatung mbH
-Anwendungsmanagement-
Rendsburger Str. 34 * 30659 Hannover
Tel.: 0511-9020-308 
mailto:inga.eckermann@profi-consult.de