Using the same CreateDOMDocument sample, you can do something like this:
DOM_DOMImplementation impl;
DOM_DocumentType doctype = impl.createDocumentType("myDoctype",
"myPublicId",
"mySystemId");
DOM_Document doc = impl.createDocument(
0, // root element namespace URI.
"company", // root element name
doctype); // document type object (DTD).
Chih-Hsiang Chou
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]
----- Original Message -----
From: "Suresh Purusothoman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 13, 2000 8:03 AM
Subject: CreateDOMDocument
Hi,
I ve managed to create a DOMtree from scratch referring the example
CreateDOMDocument and can save it as a file.
Now how to i include the <!DOCTYPE ... SYSTEM > info in the DOM tree so the
parser can include this info when creating the xml file.
Thanks much,
sp