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 Doctype declaration using Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Doctype declaration using " Watch "Doctype declaration using " New topic
Author

Doctype declaration using

Rosalinde Casalini
Greenhorn

Joined: Jul 13, 2001
Posts: 5
HI,
I am using jaxp1.0.
I have built an xml to send as an output stream to a socket connection, but i don't know how to output <!DOCTYPE somedata SYSTEM "somedata.dtd">
If anyone has any ideas I would appreciate it.
Thank you,
Rosalinde
Rosalinde Casalini
Greenhorn

Joined: Jul 13, 2001
Posts: 5
Hi,
I still haven't gotten any responses. Maybe my question was not clear I can build an xml with my java code by creating 'document' with the code below and appending the elements. But I do not see a way to insert a
<!doctype> declaration before the root element. Does anybody have any ideas? I would appreciate it very much. Thank you.

DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
DocumentBuilderFactory factory =
DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.newDocument();
 
 
subject: Doctype declaration using
 
Threads others viewed
Positioning DocType with transformer
problem of transforming XML to WML
XHTML issue
Generating !DOCTYPE tag for a Document
Getting error in XSL Transformation
MyEclipse, The Clear Choice