import org.xml.sax.*; public class RSSResolver implements EntityResolver { public InputSource resolveEntity(String publicId, String systemId) { if ( publicId.equals( "-//Netscape Communications//DTD RSS 0.91//EN") || systemId.equals( "http://my.netscape.com/publish/formats/rss-0.91.dtd")) { return new InputSource( "http://www.ibiblio.org/xml/dtds/rss.dtd"); } else { // use the default behaviour return null; } } }