Class HtmlToPlainTextConverter

java.lang.Object
org.apache.maven.tools.plugin.generator.HtmlToPlainTextConverter
All Implemented Interfaces:
Converter

public class HtmlToPlainTextConverter extends Object implements Converter
Replaces (X)HTML content by plain text equivalent. Based on work from JSoup Example: HtmlToPlainText.
  • Constructor Details

    • HtmlToPlainTextConverter

      public HtmlToPlainTextConverter()
  • Method Details

    • convert

      public String convert(String text)
      Specified by:
      convert in interface Converter
    • getPlainText

      private String getPlainText(org.jsoup.nodes.Element element)
      Format an Element to plain-text
      Parameters:
      element - the root element to format
      Returns:
      formatted text