You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Jason Rizer <ja...@yahoo.com> on 2001/05/15 21:11:45 UTC
Re: Andy Clark, was: load-external-dtd?
Andy,
I finally got a chance to try this. It worked great.
It's much cleaner than the way I had previously been
solving the problem. Thanks alot.
Blue Skies
-Jason
--- Andy Clark <an...@apache.org> wrote:
> Jason Rizer wrote:
> > Unfortunately, I'm constrained to version 1.2.1 :(
> > Does anyone have a work around for this problem
> using
> > 1.2.1? Any help would be greatly appreciated!
>
> parser.setEntityResolver(new EntityResolver() {
> public InputSource resolveEntity(String pubId,
> String sysId)
> throws SAXException, IOException {
> if (sysId.endsWith(".dtd")) {
> Reader reader = new StringReader("");
> InputSource source = new InputSource(reader);
> source.setPublicId(pubId);
> source.setSystemId(sysId);
> return source;
> }
> return null;
> }
> });
>
> Note: I didn't check the code for errors.
>
> --
> Andy Clark * IBM, TRL - Japan * andyc@apache.org
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> xerces-j-user-help@xml.apache.org
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org