xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Macomber <JMacom...@NetByTel.com>
Subject Inserting a DOCTYPE in the DOM
Date Wed, 06 Jun 2001 15:15:25 GMT
Hi all,

I am using xerces 1.2.2 with the DOM implementation.  I am trying to insert
the DOCTYPE element to include a system dtd.  I have the following code
snippet:

DOMImplementationImpl impl =
(DOMImplementationImpl)DOMImplementationImpl.getDOMImplementation();
DocumentType type = impl.createDocumentType("VALIDATE_RESPONSE", null,
"http://127.0.0.1/architecture/repository/VALIDATE_RESPONSE.dtd");
Document myResponseDoc = impl.createDocument(null,"VALIDATE_RESPONSE",type);

I then continue to append the elements and text nodes in the normal manner.
The methods above do not give an error but when I read out the DOM I am not
seeing the DOCTYPE element appearing.  It is a possibility that the problem
lies in the output routines though I have tested this by parsing in an XML
with the DOCTYPE element and writing it out using my routines with out a
problem.  I am hoping that some one out there can tell me what I am doing
wrong.

Thanks,
Jeff Macomber


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message