FileDocCategorySizeDatePackage
SAX1ParserAdapter.javaAPI DocAndroid 1.5 API5899Wed May 06 22:41:42 BST 2009org.ccil.cowan.tagsoup.jaxp

SAX1ParserAdapter

public class SAX1ParserAdapter extends Object implements Parser
This is a simpler adapter class that allows using SAX1 interface on top of basic SAX2 implementation, such as TagSoup.
author
Tatu Saloranta (cowtowncoder@yahoo.com)
deprecated

Fields Summary
final XMLReader
xmlReader
Constructors Summary
public SAX1ParserAdapter(XMLReader xr)

        xmlReader = xr;
    
Methods Summary
public voidparse(org.xml.sax.InputSource source)

        try {
            xmlReader.parse(source);
        } catch (IOException ioe) {
            throw new SAXException(ioe);
        }
    
public voidparse(java.lang.String systemId)

        try {
            xmlReader.parse(systemId);
        } catch (IOException ioe) {
            throw new SAXException(ioe);
        }
    
public voidsetDTDHandler(org.xml.sax.DTDHandler h)

        xmlReader.setDTDHandler(h);
    
public voidsetDocumentHandler(org.xml.sax.DocumentHandler h)

deprecated

        xmlReader.setContentHandler(new DocHandlerWrapper(h));
    
public voidsetEntityResolver(org.xml.sax.EntityResolver r)

        xmlReader.setEntityResolver(r);
    
public voidsetErrorHandler(org.xml.sax.ErrorHandler h)

        xmlReader.setErrorHandler(h);
    
public voidsetLocale(java.util.Locale locale)

        /* I have no idea what this is supposed to do... so let's
         * throw an exception
         */
        throw new SAXNotSupportedException("TagSoup does not implement setLocale() method");