码迷,mamicode.com
首页 > Web开发 > 详细

jsoup入门

时间:2019-01-19 12:22:08      阅读:216      评论:0      收藏:0      [点我收藏+]

标签:html   soup   imp   str   string   int   sys   document   test   

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;



public class Test {
    public static void main(String[] args) {
        String html = "<html><head><title>First parse</title></head>"
                + "<body><p>Parsed HTML into a doc.</p></body></html>";
        Document doc = Jsoup.parse(html);
        String title = doc.title();
        System.out.println(title);
    }
}

 

jsoup入门

标签:html   soup   imp   str   string   int   sys   document   test   

原文地址:https://www.cnblogs.com/xiaofengfree/p/10291157.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!