Java HTML Parse Jsoup parseEmail(String content)

Here you can find the source of parseEmail(String content)

Description

parse Email

License

Apache License

Declaration

public static String parseEmail(String content) 

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 parseEmail(String content) {
        StringBuffer sb = new StringBuffer();
        Document document = Jsoup.parse(content.toString());
        Elements div = document.getElementsByTag("span");
        for (Element e : div) {
            sb.append(e.text());//  www .  j a  v a 2  s.  c  o m
        }
        return sb.toString();
    }
}

Related

  1. parse(String html)
  2. parse(String html)
  3. parse(String html)
  4. parse(URL url, int timeout)
  5. parseByteData(ByteBuffer byteData, String charsetName, String baseUri, Parser parser)
  6. parseFile(String filePath)
  7. parseInfoBody(Element element)
  8. parseInfoHeader(Element element)
  9. parsePropertyTable(Element table)