[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jakarta-commons-user
Subject:    Re: FW: Digester & doctype declaration
From:       "Craig R. McClanahan" <craigmcc () apache ! org>
Date:       2003-12-28 18:21:42
[Download RAW message or body]

Quoting "Iantosca, Jonathan" <jiantosca@tiaa-cref.org>:

> 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


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic