Class CmsHtml2TextConverter

    • Constructor Detail

    • Method Detail

      • html2text

        public static java.lang.String html2text​(java.lang.String html,
                                                 java.lang.String encoding)
                                          throws java.lang.Exception
        Extracts the text from the given html content, assuming the given html encoding.

        Parameters:
        html - the content to extract the plain text from
        encoding - the encoding to use
        Returns:
        the text extracted from the given html content
        Throws:
        java.lang.Exception - if something goes wrong
      • visitTag

        public void visitTag​(org.htmlparser.Tag tag)
        Description copied from interface: I_CmsHtmlNodeVisitor
        Visitor method (callback) invoked when a starting Tag (HTML comment) is encountered.

        Specified by:
        visitTag in interface I_CmsHtmlNodeVisitor
        Overrides:
        visitTag in class CmsHtmlParser
        Parameters:
        tag - the tag that is visited.
        See Also:
        NodeVisitor.visitTag(org.htmlparser.Tag)