unable to find DTD

M

Mithil

Hi ,

I am not sure whether this is the correct place to post it, if not i
am sorry. Anyway my question is:

I have defined the location of the DTD in the XML file using this tag:

<!DOCTYPE blah SYSTEM "filename.dtd">

I am assuming that the the filename.dtd will be looked up where the
XML file's location (as i give the location of the xml file) is when
being parsed by the parser, in my case a DOM parser. But that doesn't
happen it looks at another default location can anyone please suggest
a fix for this or even explanation of why it happens would be great.

Thanks all,
Mithil
 
R

rainer.hohn

Hi ,

I am not sure whether this is the correct place to post it, if not i
am sorry. Anyway my question is:

I have defined the location of the DTD in the XML file using this tag:

<!DOCTYPE blah SYSTEM "filename.dtd">

I am assuming that the the filename.dtd will be looked up where the
XML file's location (as i give the location of the xml file) is when
being parsed by the parser, in my case a DOM parser. But that doesn't
happen it looks at another default location can anyone please suggest
a fix for this or even explanation of why it happens would be great.

Thanks all,
Mithil


Hi,

I think you might want to implement your own EntityResolver and hand
it
to the parser via the setEntityResolver Method.
A simple Example of doing so, can be found here ->
http://www.ibm.com/developerworks/library/x-tipent.html

Cheers

Rainy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top