Java HTML Parse Jsoup cleanHTMLTags(String str)

Here you can find the source of cleanHTMLTags(String str)

Description

Remove HTML tags.

License

Open Source License

Parameter

Parameter Description
str The HTML sting

Declaration

public static String cleanHTMLTags(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.jsoup.Jsoup;

public class Main {
    /**/*from w w w.jav  a  2 s . c om*/
     * Remove HTML tags.
     * 
     * @param str
     *            The HTML sting
     * @return
     */
    public static String cleanHTMLTags(String str) {
        if (str == null) {
            return null;
        }
        return Jsoup.parse(str).text();
    }
}

Related

  1. clean(String html)
  2. clean(String html, Whitelist whitelist)
  3. cleanHTML(final String html)
  4. cleanHtmlCode(String html)
  5. cleanHtmlFromString(String stringToClean)
  6. cleanupHtmlDoc(String s)
  7. clearBody(String html)
  8. coverTag(String html, String... tagNames)
  9. extractRssUrl(String html, URI base)