org.htmlparser.tags

Class TableTag

Implemented Interfaces:
Cloneable, Node, Serializable, Tag

public class TableTag
extends CompositeTag

A table tag.

Field Summary

Fields inherited from class org.htmlparser.tags.CompositeTag

mDefaultCompositeScanner, mEndTag

Fields inherited from class org.htmlparser.nodes.TagNode

breakTags, mAttributes, mDefaultScanner

Fields inherited from class org.htmlparser.nodes.AbstractNode

children, mPage, nodeBegin, nodeEnd, parent

Constructor Summary

TableTag()
Create a new table tag.

Method Summary

String[]
getEndTagEnders()
Return the set of end tag names that cause this tag to finish.
String[]
getIds()
Return the set of names handled by this tag.
TableRow
getRow(int index)
Get the row at the given index.
int
getRowCount()
Get the number of rows in this table.
TableRow[]
getRows()
Get the row tags within this table.
String
toString()
Return a string suitable for debugging display.

Methods inherited from class org.htmlparser.tags.CompositeTag

accept, childAt, children, collectInto, digupStringNode, elements, findPositionOf, findPositionOf, findPositionOf, getChild, getChildCount, getChildrenAsNodeArray, getChildrenHTML, getEndTag, getStringText, getText, putChildrenInto, putEndTagInto, removeChild, searchByName, searchFor, searchFor, searchFor, searchFor, setEndTag, toHtml, toPlainTextString, toString, toString

Methods inherited from class org.htmlparser.nodes.TagNode

accept, breaksFlow, getAttribute, getAttributeEx, getAttributesEx, getEndTag, getEndTagEnders, getEnders, getEndingLineNumber, getIds, getRawTagName, getStartingLineNumber, getTagBegin, getTagEnd, getTagName, getText, getThisScanner, isEmptyXmlTag, isEndTag, removeAttribute, setAttribute, setAttribute, setAttribute, setAttributeEx, setAttributesEx, setEmptyXmlTag, setEndTag, setTagBegin, setTagEnd, setTagName, setText, setThisScanner, toHtml, toPlainTextString, toString

Methods inherited from class org.htmlparser.nodes.AbstractNode

accept, clone, collectInto, doSemanticAction, getChildren, getEndPosition, getFirstChild, getLastChild, getNextSibling, getPage, getParent, getPreviousSibling, getStartPosition, getText, setChildren, setEndPosition, setPage, setParent, setStartPosition, setText, toHtml, toHtml, toPlainTextString, toString

Constructor Details

TableTag

public TableTag()
Create a new table tag.

Method Details

getEndTagEnders

public String[] getEndTagEnders()
Return the set of end tag names that cause this tag to finish.
Specified by:
getEndTagEnders in interface Tag
Overrides:
getEndTagEnders in interface TagNode
Returns:
The names of following end tags that stop further scanning.

getIds

public String[] getIds()
Return the set of names handled by this tag.
Specified by:
getIds in interface Tag
Overrides:
getIds in interface TagNode
Returns:
The names to be matched that create tags of this type.

getRow

public TableRow getRow(int index)
Get the row at the given index.
Parameters:
index - The row number (zero based) to get.
Returns:
The row for the given index.

getRowCount

public int getRowCount()
Get the number of rows in this table.
Returns:
The number of rows in this table. Note: this is a a simple count of the number of tags and may be incorrect if the tags span multiple rows.

getRows

public TableRow[] getRows()
Get the row tags within this table.
Returns:
The rows directly contained by this table.

toString

public String toString()
Return a string suitable for debugging display.
Specified by:
toString in interface Node
Overrides:
toString in interface CompositeTag
Returns:
The table as HTML, sorry.

HTML Parser is an open source library released under LGPL. SourceForge.net