public class HtmlDocumentParser extends Object
Modifier and Type | Field and Description |
---|---|
static int |
CLOSE_TAG
Constant for close tag token.
|
static int |
COMMENT
Constant for comment token.
|
static int |
END
Constant for end token.
|
static int |
OPEN_TAG
Constant for open tag token.
|
static int |
OPENCLOSE_TAG
Constant for open/close tag token.
|
static int |
TEXT
Constant for text token.
|
static int |
UNKNOWN
constant for unknown token.
|
Constructor and Description |
---|
HtmlDocumentParser(String document)
Create the parser for the current document.
|
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getAttributes()
Get the attributes of the tag.
|
String |
getComment()
Get the comment.
|
int |
getNextToken()
Iterates through the document searching for tokens.
|
String |
getTag()
Get the tag name.
|
String |
getText()
Get the text.
|
public static final int CLOSE_TAG
public static final int COMMENT
public static final int END
public static final int OPEN_TAG
public static final int OPENCLOSE_TAG
public static final int TEXT
public static final int UNKNOWN
public HtmlDocumentParser(String document)
document
- The document to parsepublic Map<String,String> getAttributes()
public String getComment()
public int getNextToken()
public String getTag()
public String getText()
Copyright © 2006–2019 Apache Software Foundation. All rights reserved.