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

SAXParserImpl

public class SAXParserImpl extends SAXParser
This is a simple implementation of JAXP {@link SAXParser}, to allow easier integration of TagSoup with the default JDK xml processing stack.
author
Tatu Saloranta (cowtowncoder@yahoo.com)

Fields Summary
final org.ccil.cowan.tagsoup.Parser
parser
Constructors Summary
protected SAXParserImpl()

        super();
        parser = new org.ccil.cowan.tagsoup.Parser();
    
Methods Summary
public booleangetFeature(java.lang.String name)

        return parser.getFeature(name);
    
public org.xml.sax.ParsergetParser()
To support SAX1 interface, we'll need to use an adapter.

deprecated

        return new SAX1ParserAdapter(parser);
    
public java.lang.ObjectgetProperty(java.lang.String name)

        return parser.getProperty(name);
    
public org.xml.sax.XMLReadergetXMLReader()

 return parser; 
public booleanisNamespaceAware()

        try {
            return parser.getFeature(Parser.namespacesFeature);
        } catch (SAXException sex) { // should never happen... so:
            throw new RuntimeException(sex.getMessage());
        }
    
public booleanisValidating()

        try {
            return parser.getFeature(Parser.validationFeature);
        } catch (SAXException sex) { // should never happen... so:
            throw new RuntimeException(sex.getMessage());
        }
    
public static org.ccil.cowan.tagsoup.jaxp.SAXParserImplnewInstance(java.util.Map features)

        SAXParserImpl parser = new SAXParserImpl();
        if (features != null) {
            Iterator it = features.entrySet().iterator();
            while (it.hasNext()) {
                Map.Entry entry = (Map.Entry) it.next();
                parser.setFeature((String) entry.getKey(), ((Boolean) entry.getValue()).booleanValue());
            }
        }
        return parser;
    
public voidsetFeature(java.lang.String name, boolean value)

        parser.setFeature(name, value);
    
public voidsetProperty(java.lang.String name, java.lang.Object value)

        parser.setProperty(name, value);