The problem with DocumentBuilderFactory.newDocument() is that it just spits
out a new document with a default root element name (as far as I can tell).
I have a root element name I want to use, but I don't want the document
associated with any doctype (as it is unused anyway and adding one would
only promote additional headaches when parsing the resultant document.
That is, if there's a doctype, then either it's a bogus doctype or it's
valid. If it's bogus, I'm not sure if I'd have problems with the parser
trying to pull in a non-existent file. In the other case, if the doctype is
valid, then I'd rather avoid the parsing of the DTD when it won't be used
anyway. As I understand it, the doctype is always parsed if it exists and
its dependant files are also parsed even if they are unused (validation is
off).
Brion Swanson
-----Original Message-----
From: Edwin Goei [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 7:30 PM
To: [EMAIL PROTECTED]
Subject: Re: creating an null DOCTYPE in Xerces2
I'm not positive, but I don't think DOM allows you to create a Document
object without have a specific DocumentType in mind first. There is a
way in JAXP, though, using the DocumentBuilderFactory.newDocument()
method. Someone can correct me if I am wrong.
-Edwin
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]