Search in sources :

Example 1 with AbstractSAXParser

use of org.apache.xerces.parsers.AbstractSAXParser in project gocd by gocd.

the class HtmlSaxParserContext method createParser.

@Override
protected AbstractSAXParser createParser() throws SAXException {
    SAXParser parser = new SAXParser();
    try {
        parser.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
        parser.setProperty("http://cyberneko.org/html/properties/names/attrs", "lower");
        return parser;
    } catch (SAXException ex) {
        throw new SAXException("Problem while creating HTML SAX Parser: " + ex.toString());
    }
}
Also used : SAXParser(org.cyberneko.html.parsers.SAXParser) AbstractSAXParser(org.apache.xerces.parsers.AbstractSAXParser) SAXException(org.xml.sax.SAXException)

Example 2 with AbstractSAXParser

use of org.apache.xerces.parsers.AbstractSAXParser in project nokogiri by sparklemotion.

the class HtmlSaxParserContext method createParser.

@Override
protected AbstractSAXParser createParser() throws SAXException {
    SAXParser parser = new SAXParser();
    try {
        parser.setProperty("http://cyberneko.org/html/properties/names/elems", "lower");
        parser.setProperty("http://cyberneko.org/html/properties/names/attrs", "lower");
        return parser;
    } catch (SAXException ex) {
        throw new SAXException("Problem while creating HTML SAX Parser: " + ex.toString());
    }
}
Also used : SAXParser(org.cyberneko.html.parsers.SAXParser) AbstractSAXParser(org.apache.xerces.parsers.AbstractSAXParser) SAXException(org.xml.sax.SAXException)

Aggregations

AbstractSAXParser (org.apache.xerces.parsers.AbstractSAXParser)2 SAXParser (org.cyberneko.html.parsers.SAXParser)2 SAXException (org.xml.sax.SAXException)2