Java HTML Parse Jsoup processHtml(String html)

Here you can find the source of processHtml(String html)

Description

process Html

License

Apache License

Declaration

public static String processHtml(String html) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

public class Main {
    public static String processHtml(String html) {
        String newHtml = html;/* w w w. j a va 2  s  .  co m*/
        Document doc = Jsoup.parse(html);
        Elements eles = doc.select("[dict]");
        for (Element ele : eles) {
            System.out.println(ele.attr("dict"));
            ele.parent().html("fffffffffffffff");
        }
        System.out.println("doc:\n" + doc.html());
        return newHtml;
    }
}

Related

  1. parseTemplate1_1(Element element)
  2. parseTemplate1_2(Element element)
  3. parseUTF8HTMLDocument(String html)
  4. parseWithAdultCheck(URL url, int timeout)
  5. prettyPrint(String html)
  6. removeAllHtmlTags(String unsafe)
  7. removeHTMLTags(final String text)
  8. removeTag(String html)
  9. sanitizeHTML(String html)