推荐使用jsoup,可能parseHtml对android支持的不是很好;
Demo:
public static void main(String[] args) throws IOException { String url = "http://www.xxx.com/"; Document doc = Jsoup.connect(url).get(); Elements elements = doc.getElementsByTag("img"); int max = elements.size(); for(int a=0;a<max;a++){ Element ment = elements.get(a); String fileName = ment.attr("src"); String fileType = fileName.substring(fileName.lastIndexOf(".")); System.out.println(ment.attr("src")+"\t"+fileType); } }