public class HtmlTreeBuilder extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
baseUri |
protected org.jsoup.parser.Token |
currentToken |
protected Document |
doc |
static int |
MaxScopeSearchDepth |
protected Parser |
parser |
protected Map<String,Tag> |
seenTags |
protected ParseSettings |
settings |
protected ArrayList<Element> |
stack |
| Constructor and Description |
|---|
HtmlTreeBuilder() |
| Modifier and Type | Method and Description |
|---|---|
protected Element |
currentElement()
Get the current element (last on the stack).
|
protected boolean |
currentElementIs(String normalName)
Checks if the Current Element's normal name equals the supplied name.
|
protected void |
error(String msg)
If the parser is tracking errors, add an error at the current position.
|
protected void |
error(String msg,
Object... args)
If the parser is tracking errors, add an error at the current position.
|
protected void |
initialiseParse(Reader input,
String baseUri,
Parser parser) |
protected boolean |
isContentForTagData(String normalName)
(An internal method, visible for Element.
|
protected void |
onNodeClosed(Node node,
org.jsoup.parser.Token token)
Called by implementing TreeBuilders when a node is explicitly closed.
|
protected void |
onNodeInserted(Node node,
org.jsoup.parser.Token token)
Called by implementing TreeBuilders when a node has been inserted.
|
protected boolean |
process(org.jsoup.parser.Token token) |
protected boolean |
processEndTag(String name) |
protected boolean |
processStartTag(String name) |
boolean |
processStartTag(String name,
Attributes attrs) |
protected void |
runParser() |
protected Tag |
tagFor(String tagName,
ParseSettings settings) |
String |
toString() |
public static final int MaxScopeSearchDepth
protected Parser parser
protected Document doc
protected String baseUri
protected org.jsoup.parser.Token currentToken
protected ParseSettings settings
@ParametersAreNonnullByDefault protected void initialiseParse(Reader input, String baseUri, Parser parser)
protected boolean process(org.jsoup.parser.Token token)
protected boolean isContentForTagData(String normalName)
protected void runParser()
protected boolean processStartTag(String name)
public boolean processStartTag(String name, Attributes attrs)
protected boolean processEndTag(String name)
protected Element currentElement()
protected boolean currentElementIs(String normalName)
normalName - name to checkprotected void error(String msg)
msg - error messageprotected void error(String msg, Object... args)
msg - error message templateargs - template argumentsprotected Tag tagFor(String tagName, ParseSettings settings)
protected void onNodeInserted(Node node, @Nullable org.jsoup.parser.Token token)
node - the node that was just insertedtoken - the (optional) token that created this nodeprotected void onNodeClosed(Node node, org.jsoup.parser.Token token)
node - the node being closedtoken - the end-tag token that closed this nodeCopyright © 2009–2022 Jonathan Hedley. All rights reserved.