public void loadHtmlFile(String htmlFilePath) { try { Document doc = Jsoup.parse(new File(htmlFilePath), "utf-8"); Elements divs = doc.select("div.hop1"); for (Element div : divs) { System.out.println(div); // 输出: div } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
#####################