Hi Julia,

I posted this before I saw your code example in which you were using a
MemBufInputSource. 

All you would need to do as append an XMLDecl and a Doctype with the
SYSTEM id set to the local file to the data in the buffer and the
parser/entityResolver will do it all for you.

I did appreciate seeing the setSystemId() method, though. Could be
useful for other things.

jas.

"Julia Larson" <[EMAIL PROTECTED]> writes:

> Right, of course.  But the original question was how to tell the 
> parser where to find the dtd.  In particular, I did not want to 
> specify a URL, but use a local file.
> 
> Cheers,
> -Julie
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 29, 2001 5:02 PM
> To: [EMAIL PROTECTED]
> Subject: Re: DTD and DomParser
> 
> 
> "Julia Larson" <[EMAIL PROTECTED]> writes:
> 
> > Please help a newbie who can't find it in the docs
> > 
> > How do I specify a DTD to use with a DomParser instance?
> > 
> > Where does it look for the dtd?  local directory?  
> > Does it need a fully qualified path?
> 
> You don't. The XML file you are parsing specifies using the DOCTYPE,
> either with PUBLIC or SYSTEM. Then it is up to an entity resolver to
> find it and give it to the parser. 
> 
> jas.
> 
> 
> ---------------------------------------------------------------------
> 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]

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

Reply via email to