Android 解析html页面中的数据
我正在开发一个android项目。我想访问网页的某些部分,但我如何才能访问?哪个解析器最适合此任务,以及如何使用此解析器。 我使用以下方法访问该网页,但现在想解析该网页Android 解析html页面中的数据,android,html,parsing,Android,Html,Parsing,我正在开发一个android项目。我想访问网页的某些部分,但我如何才能访问?哪个解析器最适合此任务,以及如何使用此解析器。 我使用以下方法访问该网页,但现在想解析该网页 public void call_a_site() { try { Uri uri = Uri.parse( "http://www.dsebd.org/" ); startActivity(new Intent(I
public void call_a_site()
{
try
{
Uri uri = Uri.parse( "http://www.dsebd.org/" );
startActivity(new Intent(Intent.ACTION_VIEW,uri));
}
catch(Exception e)
{
}
}
请帮忙。。
谢谢查看JSoup食谱 这里面有很多好的信息,应该能够回答你的大部分问题
您可能正在寻找类似的东西:Jsoup库是Html解析的最佳选择 步骤1:下载jsoup.x.x.x.jar
步骤2:在IDE的libs文件夹中导入
步骤3:设置为库
样本
// Connect to the web site
Document document = Jsoup.connect(url).get();
// Using Elements to get the Meta data
Elements description = document
.select("meta[name=description]");
//Locate the content attribute
desc = description.attr("content");
也许能回答你的问题。