On 28-Dec-03, at 19:21 Uhr, Craig R. McClanahan wrote:


Quoting "Iantosca, Jonathan" <[EMAIL PROTECTED]>:

Hello,

I'm trying to digest an xml file with the following doctype declaration.

<!DOCTYPE adaptor SYSTEM "woadaptor.dtd">

I keep getting a java.net.UnknownHostException when this declaration is in
the xml document. As soon as I remove it, the digester has no problems.
Also, before parsing, I'm calling the Digester's setValidating method,
passing in false.


Any Thoughts?

-Jon


In order for the XML parser to be able to resolve this relative URL
("woadaptor.dtd"), it has to know the URL of the document (that contains this
line) that you are actually parsing. In turn, that means you need to use one
of the Digester.parse() methods that provides this information -- either a
File, an InputSource, or a String. Don't use the one that takes an
InputStream.


Craig

Dare I add to this that validation being turned off does not mean the DTD will not be loaded. DTDs provide, among others, default values for attributes hence need to be read at every parsing.


Paul


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to