- All Known Subinterfaces:
- EntityResolver2
- All Known Implementing Classes:
- DefaultHandler, DefaultHandler2, HandlerBase, XMLFilterImpl
- See Also:
- Top Examples, Source Code,
XMLReader.setEntityResolver(org.xml.sax.EntityResolver)
,
InputSource
InputSource resolveEntity(String publicId,
String systemId)
throws SAXException,
IOException
- Geek's Notes:
- Description Add your codes or notes Search More Java Examples
[60]RSSResolver
By Anonymous on 2002/10/08 11:25:45 Rate
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://metalab.unc.edu/xml/dtds/rss.dtd" ) ;
}
else {
// use the default behaviour
return null;
}
}
}