Package org.eclipse.jface.internal.text.html

Examples of org.eclipse.jface.internal.text.html.HTML2TextReader


    }
    matcher.appendTail(buffer);

    String html = buffer.toString();
    String result = IOUtils.toString(
        new HTML2TextReader(new StringReader(html), null));
    // remove \r for windows
    result = result.replaceAll("\r", "");
    // compact excessive spacing between sig and doc.
    result = result.replaceFirst("\n\n\n", "\n\n");
View Full Code Here


   */
  public static String stripTags(String html) {
    if (html != null) {
      try {
        StringReader reader = new StringReader(html);
        HTML2TextReader parser = new HTML2TextReader(reader, null);
        return parser.getString().trim();
      }
      catch (IOException e) {
        StatusHandler.log(new Status(IStatus.ERROR, ConfigCorePlugin.PLUGIN_ID,
            Messages.XmlBackedContentProposalProvider_ERROR_STRIP_TAGS, e));
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jface.internal.text.html.HTML2TextReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.