So I got several Elements captured and I want to remove these out of another captured Elements.
My Code looks like this:
try {
doc = Jsoup.connect(url).get();
} catch (IOException ex) {
Logger.getLogger(FullFrame.class.getName()).log(Level.SEVERE, null, ex);
}
Elements remove = doc.select("cssquerytofindremoveElements");
I now got my Elements which I want to remove, let's say I got antoher
Elements el = doc.select("cssquery");
I want to remove the Elements I selected before ("remove") from the Elements I selected just now ("el").
Big thanks to everyone helping :)
你去,繁荣!
el.select("cssquerytofindremoveElements").remove();
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.