org.htmlparser

Interface Text

All Superinterfaces:
Cloneable, Node
Known Implementing Classes:
TextNode

public interface Text
extends Node

This interface represents a piece of the content of the HTML document.

Method Summary

String
getText()
Accesses the textual contents of the node.
void
setText(String text)
Sets the contents of the node.

Methods inherited from interface org.htmlparser.Node

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

Method Details

getText

public String getText()
Accesses the textual contents of the node.
Specified by:
getText in interface Node
Returns:
The text of the node.

setText

public void setText(String text)
Sets the contents of the node.
Specified by:
setText in interface Node
Parameters:
text - The new text for the node.
See Also:
getText()

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