|
||||||
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 | |
---|---|
java.lang.String |
getConfiguration()
Returns the configuartion String of this visitor or the empty String if was not provided before. |
java.lang.String |
getResult()
Returns the text extraction result. |
java.lang.String |
process(java.lang.String html,
java.lang.String encoding)
Extracts the text from the given html content, assuming the given html encoding. |
void |
setConfiguration(java.lang.String configuration)
Set a configuartion String for this visitor. |
void |
setNoAutoCloseTags(java.util.List<java.lang.String> noAutoCloseTags)
Sets a list of upper case tag names for which parsing / visitng should not correct missing closing tags. |
void |
visitEndTag(org.htmlparser.Tag tag)
Visitor method (callback) invoked when a closing Tag is encountered. |
void |
visitRemarkNode(org.htmlparser.Remark remark)
Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered. |
void |
visitStringNode(org.htmlparser.Text text)
Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered. |
void |
visitTag(org.htmlparser.Tag tag)
Visitor method (callback) invoked when a starting Tag (HTML comment) is encountered. |
Method Detail |
---|
java.lang.String getConfiguration()
setConfiguration(String)
java.lang.String getResult()
java.lang.String process(java.lang.String html, java.lang.String encoding) throws org.htmlparser.util.ParserException
html
- the content to extract the plain text fromencoding
- the encoding to use
org.htmlparser.util.ParserException
- if something goes wrongvoid setConfiguration(java.lang.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 setNoAutoCloseTags(java.util.List<java.lang.String> noAutoCloseTags)
This has to be used before
is invoked to take an effect.process(String, String)
noAutoCloseTags
- a list of upper case tag names for which parsing / visiting
should not correct missing closing tags to set.void visitEndTag(org.htmlparser.Tag tag)
tag
- the tag that is ended.NodeVisitor.visitEndTag(org.htmlparser.Tag)
void visitRemarkNode(org.htmlparser.Remark remark)
remark
- the remark Tag to visit.NodeVisitor.visitRemarkNode(org.htmlparser.Remark)
void visitStringNode(org.htmlparser.Text text)
text
- the text that is visited.NodeVisitor.visitStringNode(org.htmlparser.Text)
void visitTag(org.htmlparser.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 |