public static interface

GroupParser.Callback

chan.text.GroupParser.Callback

Class Overview

Callback for GroupParser.

Summary

Public Methods
abstract void onEndElement(GroupParser parser, String tagName)

This method will be called in linear mode every time parser reaches end of tag.

abstract void onGroupComplete(GroupParser parser, String text)

This method will be called in group mode every time parser reaches end of group.

abstract boolean onStartElement(GroupParser parser, String tagName, String attrs)

This method will be called in linear mode every time parser reaches new tag.

abstract void onText(GroupParser parser, String source, int start, int end)

This method will be called in linear mode every time parser skips text.

Public Methods

public abstract void onEndElement (GroupParser parser, String tagName)

This method will be called in linear mode every time parser reaches end of tag.

Parameters
parser GroupParser: GroupParser instance.
tagName String: Name of tag.
Throws
ParseException to interrupt parsing process.

public abstract void onGroupComplete (GroupParser parser, String text)

This method will be called in group mode every time parser reaches end of group.

Parameters
parser GroupParser: GroupParser instance.
text String: Text inside tag.
Throws
ParseException to interrupt parsing process.

public abstract boolean onStartElement (GroupParser parser, String tagName, String attrs)

This method will be called in linear mode every time parser reaches new tag.

Parameters
parser GroupParser: GroupParser instance.
tagName String: Name of tag.
attrs String: Encoded attributes inside tag.
Returns
boolean True to switch parser to group mode.
Throws
ParseException to interrupt parsing process.

public abstract void onText (GroupParser parser, String source, int start, int end)

This method will be called in linear mode every time parser skips text.

Parameters
parser GroupParser: GroupParser instance.
source String: Source string.
start int: Start index of text.
end int: End index of text.
Throws
ParseException to interrupt parsing process.