> Hi all,
>
[quoted text clipped - 6 lines]
> and when i try to load the response inputStream in xml Document.
> i get an parsing error saying myDTD.dtd could not be found
Written like that, "myDTD.dtd" is relative to the xml-document.
When the document is just in a stream, where to find it?
Replace "myDTD.dtd" with an absolute URL to the DTD should help.

Signature
Dag.
Nishant - 08 Jun 2006 10:28 GMT
Hi Dag,
Thanks for your response.
This xml document is returned by the server only. I can't change it.
Is there any other way I can solve this issue.
Regards,
Nishant
> > Hi all,
> >
[quoted text clipped - 11 lines]
>
> Replace "myDTD.dtd" with an absolute URL to the DTD should help.
asaguden - 08 Jun 2006 14:35 GMT
Yes,
Include the DTD in the output XML.
We have done this, merging the generated XML and DTD into
a new XML with XSL.
/ Peter
> > Hi all,
> >
[quoted text clipped - 11 lines]
>
> Replace "myDTD.dtd" with an absolute URL to the DTD should help.
> Hi all,
>
[quoted text clipped - 10 lines]
> -where to keep these DTDs so that the tomcat will be able to find it.
> -Is it OK to keep all the DTDs in the TOMCAT_ROOT/bin folder.
You can't rely on that directory being the "current" directory.
How about grabbing the entire document to a buffer and snipping
out the offending <!DOCTYPE ..> line?
Bill
Nishant - 16 Jun 2006 10:35 GMT
Hi Peter and Bill,
Thanks for ur response.
I solved the problem by moving the DTDs in a folder with web-access and
now I am passing the url as System Id while parsing the document.
doc =
docBuilderObj.parse(resp.getInputStream(),"http://myServer/myApp/DTD/");
Think this would be easy an approach bcos I wud need these DTDs
again while forming the XML data for Http POST.
let me know ur opinion on this.
Regards,
Nishant Purohit
> > Hi all,
> >
[quoted text clipped - 17 lines]
>
> Bill