好的,我想要实现的是将每个结果JSoup
写在一个单独的String
中。这有点可能吗?我可以得到第一个和最后一个函数,但是,是的,其余的都丢失了。
现在我在我的doInBackground中有这个:
// Connect to the web site
Document document = Jsoup.connect(url).get();
// Using Elements to get the Meta data
Elements titleElement = document.select("h2[property=schema:name]");
// Locate the content attribute
date1 = titleElement.toString();
Log.e("Date", String.valueOf(Html.fromHtml(date1)));
有了这个,我得到了一个很好的结果列表,但是我希望将每个结果都放在一个单独的字符串中。
提前致谢,如果您还有其他需要,请询问:)
答案 0 :(得分:0)
我再次仔细阅读文档并发现:
element.eq(n).text
“n”定义要获取的位置,.text剥离所有html并使其成为可读文本