Class HTMLParser
java.lang.Object
com.github.westsi.browser.util.html.HTMLParser
Lexes and parses source HTML into a tree of
HTMLElement
s.
Supports HTML Entities and self-closing tags.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionParses the HTML source to the DOM Tree.void
printTree
(HTMLElement node, int indent)
-
Constructor Details
-
HTMLParser
public HTMLParser()
-
-
Method Details
-
parse
Parses the HTML source to the DOM Tree.- Parameters:
body
- The HTML source text to be parsed.- Returns:
- The root of the DOM tree which will be a
HTMLElement
.
-
printTree
-