The goog.string.html.HtmlParser Class

goog.string.html.HtmlParser()

An Html parser: {@code parse} takes a string and calls methods on {@code goog.string.html.HtmlSaxHandler} while it is visiting it.

The goog.string.html.HtmlParser.EFlags Enum

The html eflags, used internally on the parser. … more

.Elements {Object}

A map of element to a bitmap of flags it has, used internally on the parser.

The goog.string.html.HtmlParser.Entities Enum

HTML entities that are encoded/decoded. TODO(user): use {@code goog.string.htmlEncode} instead. … more

.parse(handler, htmlText)

Given a SAX-like {@code goog.string.html.HtmlSaxHandler} parses a {@code htmlText} and lets the {@code handler} know the structure while visiting the nodes.

handler {goog.string.html.HtmlSaxHandler}
The HtmlSaxHandler that will receive the events.
htmlText {string}
The html text.