| org.opencms.util.I_CmsHtmlNodeVisitor
All known Subclasses: org.opencms.workplace.tools.content.CmsTagReplaceParser, org.opencms.util.CmsHtmlParser,
I_CmsHtmlNodeVisitor | public interface I_CmsHtmlNodeVisitor (Code) | | Interface for a combination of a visitor of HTML documents along with the hook to start the
parser / lexer that triggers the visit.
author: Alexander Kandzior version: $Revision: 1.6 $ since: 6.1.3 |
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 | setNoAutoCloseTags(List noAutoCloseTags) | 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. |
getConfiguration | String getConfiguration()(Code) | | Returns the configuartion String of this visitor or the empty String if was not provided
before.
the configuartion String of this visitor - by this contract never null but an emptyString if not provided. See Also: I_CmsHtmlNodeVisitor.setConfiguration(String) |
getResult | String getResult()(Code) | | Returns the text extraction result.
the text extraction result |
process | String process(String html, String encoding) throws ParserException(Code) | | Extracts the text from the given html content, assuming the given html encoding.
Parameters: html - the content to extract the plain text from Parameters: encoding - the encoding to use the text extracted from the given html content throws: ParserException - if something goes wrong |
setConfiguration | void setConfiguration(String configuration)(Code) | | Set a configuartion String for this visitor.
This will most likely be done with data from an xsd, custom jsp tag, ...
Parameters: configuration - the configuration of this visitor to set. |
setNoAutoCloseTags | void setNoAutoCloseTags(List noAutoCloseTags)(Code) | | Sets a list of upper case tag names for which parsing / visitng should not correct missing closing tags.
This has to be used before
I_CmsHtmlNodeVisitor.process(String,String) is invoked to take an effect.
Parameters: noAutoCloseTags - a list of upper case tag names for which parsing / visiting should not correct missing closing tags to set. |
visitEndTag | void visitEndTag(Tag tag)(Code) | | Visitor method (callback) invoked when a closing Tag is encountered.
Parameters: tag - the tag that is ended. See Also: org.htmlparser.visitors.NodeVisitor.visitEndTag(org.htmlparser.Tag) |
visitRemarkNode | void visitRemarkNode(Remark remark)(Code) | | Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered.
Parameters: remark - the remark Tag to visit. See Also: org.htmlparser.visitors.NodeVisitor.visitRemarkNode(org.htmlparser.Remark) |
visitStringNode | void visitStringNode(Text text)(Code) | | Visitor method (callback) invoked when a remark Tag (HTML comment) is encountered.
Parameters: text - the text that is visited. See Also: org.htmlparser.visitors.NodeVisitor.visitStringNode(org.htmlparser.Text) |
visitTag | void visitTag(Tag tag)(Code) | | Visitor method (callback) invoked when a starting Tag (HTML comment) is encountered.
Parameters: tag - the tag that is visited. See Also: org.htmlparser.visitors.NodeVisitor.visitTag(org.htmlparser.Tag) |
|
|