You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Mike Oliver <mo...@unt.edu> on 2006/11/16 02:50:21 UTC

How to find DTD file using DOMBuilder::parseURI()

I'm having a bit of difficulty finding a way to use
DOMBuilder::parseURI() when the DTD file is not in the
same directory as the XML file.  I've tried calling
DOMBuilder::loadGrammar() immediately previously, even
turning caching on, but it doesn't seem to make any
difference; when I go to parse the XML file, if the
DTD file isn't right there in the same directory, it
chokes.  Any ideas?

Re: How to find DTD file using DOMBuilder::parseURI()

Posted by Alberto Massari <am...@datadirect.com>.
Hi Mike,
you should use an entity resolver (see the Redirect sample)

Alberto

At 17.50 15/11/2006 -0800, Mike Oliver wrote:
>I'm having a bit of difficulty finding a way to use
>DOMBuilder::parseURI() when the DTD file is not in the
>same directory as the XML file.  I've tried calling
>DOMBuilder::loadGrammar() immediately previously, even
>turning caching on, but it doesn't seem to make any
>difference; when I go to parse the XML file, if the
>DTD file isn't right there in the same directory, it
>chokes.  Any ideas?