|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface I_CmsHtmlNodeVisitor
Interface for a combination of a visitor of HTML documents along with the hook to start the parser / lexer that triggers the visit.
| Method Summary | |
|---|---|
String |
getConfiguration()
Returns the configuartion String of this visitor or the empty String if was not provided before. |
String |
getResult()
Returns the text extraction result. |
String |
process(String html,
String encoding)
Extracts the text from the given html content, assuming the given html encoding. |
void |
setConfiguration(String configuration)
Set a configuartion String for this visitor. |
void |
visitEndTag(Tag tag)
Visitor method (callback) invoked when a closing Tag is encountered. |
void |
visitRemarkNode(Remark remark)
Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered. |
void |
visitStringNode(Text text)
Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered. |
void |
visitTag(Tag tag)
Visitor method (callback) invoked when a starting Tag (HTML comment) is encountered. |
| Method Detail |
|---|
String getConfiguration()
setConfiguration(String)String getResult()
String process(String html,
String encoding)
throws ParserException
html - the content to extract the plain text fromencoding - the encoding to use
ParserException - if something goes wrongvoid setConfiguration(String configuration)
This will most likely be done with data from an xsd, custom jsp tag, ...
configuration - the configuration of this visitor to set.void visitEndTag(Tag tag)
tag - the tag that is ended.NodeVisitor.visitEndTag(org.htmlparser.Tag)void visitRemarkNode(Remark remark)
remark - the remark Tag to visit.NodeVisitor.visitRemarkNode(org.htmlparser.Remark)void visitStringNode(Text text)
text - the text that is visited.NodeVisitor.visitStringNode(org.htmlparser.Text)void visitTag(Tag tag)
tag - the tag that is visited.NodeVisitor.visitTag(org.htmlparser.Tag)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||