I am trying to parse my html file with jsoup and I need to build Elements object which will contain an array of divs (like on picture below). How can i do that with select syntax?
Each element of Elements must contains "news":
Thanks!
You select class names with the dot ( .
) selector, and ids with #
, so:
Elements newsClass = myDocument.select(".news");
Elements newsMainId = myDocument.select("#newsMain");
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.