com.google.caja.parser.html.DomParser

Here are the examples of the java api class com.google.caja.parser.html.DomParser taken from open source projects.

1. CajaTestCase#parseMarkup()

Project: caja
File: CajaTestCase.java
private Node parseMarkup(CharProducer cp, boolean asXml, boolean asDoc) throws ParseException {
    InputSource is = sourceOf(cp);
    HtmlLexer lexer = new HtmlLexer(cp);
    lexer.setTreatedAsXml(asXml);
    TokenQueue<HtmlTokenType> tq = new TokenQueue<HtmlTokenType>(lexer, is, DomParser.SKIP_COMMENTS);
    DomParser p = new DomParser(tq, asXml, mq);
    Node t = asDoc ? p.parseDocument() : p.parseFragment();
    tq.expectEmpty();
    return t;
}