Jsoup解析HTML

今天在学习android解析HTML,突然找到一个工具Jsoup解析HTML挺好,并且语法像js一样

String htmlString = getHtmlString("http://www.baidu.com");  
Document document = Jsoup.parse(htmlString);  
String title = document.head().getElementsByTag("title").text();  

  Jsoup的官方网站http://jsoup.org/里面解析的很详细

Document doc = Jsoup.parse(new URL("http://www.badidu.com"), 5000);  
posted @ 2012-10-28 22:57  win_and_first  阅读(318)  评论(0编辑  收藏  举报