|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.html.HtmlParser
public class HtmlParser
This is a class that is used to parse a block of HTML code into separate tokens. This parser uses a recursive descent approach.
Field Summary | |
---|---|
static int |
COMMENT
A HTML comment "<!-- some text -->" |
static int |
DOUBLEQUOTE
This is the character '"' |
static int |
DQSTRING
This is a Double Quoted String a "string" |
static int |
END
This indicates the end of a block. |
static int |
EQUALS
Equals '=' |
static int |
LT
Less Than '<' |
static int |
MT
More Than '>' |
static int |
SCRIPT
A HTML script |
static int |
SINGELQUOTE
This is the character ''' |
static int |
SQSTRING
This is a Single Quoted String a 'string' |
static int |
START
This indicates the start of a block. |
static int |
STRING
This indicate a String value was found. |
static int |
UNKNOWN
Unknown token. |
Constructor Summary | |
---|---|
HtmlParser(Charset cs)
Create a new HTMLParser |
Method Summary | |
---|---|
HtmlBlock |
parse()
Get a HtmlBlock from the pagepart given. |
void |
setText(byte[] page)
Set the data block to parse. |
void |
setText(byte[] page,
int startIndex,
int length)
Set the data block to parse. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int START
public static final int STRING
public static final int SQSTRING
public static final int DQSTRING
public static final int SINGELQUOTE
public static final int DOUBLEQUOTE
public static final int LT
public static final int MT
public static final int EQUALS
public static final int COMMENT
public static final int SCRIPT
public static final int END
public static final int UNKNOWN
Constructor Detail |
---|
public HtmlParser(Charset cs)
Method Detail |
---|
public void setText(byte[] page)
page
- the block to parse.public void setText(byte[] page, int startIndex, int length)
page
- the block to parse.length
- the length of the data.public HtmlBlock parse() throws HtmlParseException
HtmlParseException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |