Reputation: 2181
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!
Upvotes: 1
Views: 490
Reputation: 22233
You select class names with the dot (.
) selector, and ids with #
, so:
Elements newsClass = myDocument.select(".news");
Elements newsMainId = myDocument.select("#newsMain");
Upvotes: 1