Class HtmlCleaner


  • public class HtmlCleaner
    extends Object
    Remove all tags from a HTML fragment - all entities are replaced by their value.
    Author:
    sfariello
    • Constructor Detail

      • HtmlCleaner

        public HtmlCleaner()
    • Method Detail

      • cleanHtmlFragment

        public String cleanHtmlFragment​(String html)
                                 throws IOException
        Remove all tags from a HTML fragment - all entities are replaced by their value.
        Parameters:
        html - a HTML fragment.
        Returns:
        a String where all tags from a HTML fragment are removed and all entities are replaced by their value.
        Throws:
        IOException