Java HTML Parse Jsoup parseTemplate1_2(Element element)

Here you can find the source of parseTemplate1_2(Element element)

Description

parse Templat_

License

Apache License

Declaration

public static synchronized void parseTemplate1_2(Element element) 

Method Source Code

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

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

public class Main {
    public static synchronized void parseTemplate1_2(Element element) {
        Element infotemplatebox = element.select("table").first();
        Elements elements = infotemplatebox.select("tr");
        for (int i = 0, total = elements.size(); i < total; i++) {
            Element item = elements.get(i);
            if (i == 1) {
                System.err.println(item.select("img").attr("src"));
            } else {
                System.err.println(item.text());
            }//from  ww  w.  j a  v a  2  s  .  c o  m
        }
        element.getElementsByClass("infoBox").remove();
        element.getElementsByClass("infotemplatebox").remove();
        elements = element.select("p");

        System.err.println(elements.text());
    }
}

Related

  1. parseInfoBody(Element element)
  2. parseInfoHeader(Element element)
  3. parsePropertyTable(Element table)
  4. parseTable2ArrayList(Document doc, String selectorRow, String selectorCol)
  5. parseTemplate1_1(Element element)
  6. parseUTF8HTMLDocument(String html)
  7. parseWithAdultCheck(URL url, int timeout)
  8. prettyPrint(String html)
  9. processHtml(String html)