Fred J.
Fred J.

Reputation: 6029

Jsoup exclude an element with certain attr

How can I exclude an element which has a certain attr value from the selected elements returned from this line

mDocument.select("input[src*=Btn],img[src*=Btn]")

I need something like "which is not working"

mDocument.select("input[src*=Btn],img[src*=Btn]:not(img[src*=notThisOne])")

Thank you

Upvotes: 1

Views: 1900

Answers (1)

Alkis Kalogeris
Alkis Kalogeris

Reputation: 17745

Try this

mDocument.select("input[src*=Btn],img[src*=Btn]").not("img[src*=notThisOne]")

Upvotes: 1

Related Questions