【发布时间】:2015-06-07 08:21:31
【问题描述】:
我使用此代码但不是真的!为什么...?
String url = "http://example.com";
ProgressDialog mProgressDialog;
@Override
protected Void doInBackground(Void... params) {
try {
// Connect to the web site
Document document = Jsoup.connect(url).get();
// Using Elements to get the Meta data
Elements description = document
.select("div[class=title]");
// Locate the content attribute
desc = description.attr("content");
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
如果我的html代码是
<div class="text-co">
<div class="title"><a href="">00</a>
<a href="">11</a>
<a href="">22</a>
</div>
</div>
<div class="text-co">
<div class="title"><a href="">33</a>
<a href="">44</a>
<a href="">55</a>
</div>
</div>
我想展示
00
11
22
33
44
55
jsoup 在我的 android 应用中,我应该怎么做
【问题讨论】:
-
有什么问题?
-
试试
desc = description.text();
标签: android html jsoup gettext