Thanks to everyone in advance -
So this issue looks to be pretty popular, I have found a few solutions, but nothing seems to stop the downloading of dtd files, for instance ones sitting up on w3.org.
Here are some of the solutions i have found:
http://stackoverflow.com/questions/155101/make-documentbuilder-parse-ignore-dtd-references
http://forums.sun.com/thread.jspa?threadID=284209&forumID=34
When I use this solution:
myDocumentBuilder.setEntityResolver(new EntityResolver() {
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
throws SAXException, java.io.IOException
{
if (publicId.equals("--myDTDpublicID--"))
// this deactivates the open office DTD
return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
else return null;
}
});
it still continues to download the dtd.
Any suggestions?
Thanks,
Sam