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.cafeconleche.org/dtds/rss.dtd");
}
else {
// use the default behaviour
return null;
}
}
}