| java.lang.Object | |
| ↳ | chan.text.GroupParser |
HTML text parser. Can work in two modes: linear and group.
In linear mode, parser will call onStartElement(GroupParser, String, String) every
time parser reaches new tag. This method has boolean result, and when this method returns true - parser switches
to group mode.
In group mode parser will handle all text inside started tag. Then it call
onGroupComplete(GroupParser, String) with all text inside tag.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GroupParser.Callback | Callback for |
||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Decodes attribute from encoded string. | |||||||||||
Stores parser's position. | |||||||||||
Starts a new parsing process. | |||||||||||
Resets parser's position to last marked one. | |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
Decodes attribute from encoded string. You can use it to handle attrs argument in
onStartElement(GroupParser, String, String) method.
| Parameters | |
|---|---|
attrs |
String:
Encoded string. |
attr |
String:
Attribute name. |
| Returns | |
|---|---|
String |
Attribute value if it exists or null.
|
Starts a new parsing process.
| Parameters | |
|---|---|
source |
String:
String to parse. |
callback |
GroupParser.Callback:
Callback to handle parsed data. |
| Throws | |
|---|---|
ParseException |
when parsing process was interrupted. |
Resets parser's position to last marked one.