Reputation: 13
i have the follow problem. I want to parse a html page with jsoup. The parsing is not the problem but i need to get the text in a div without using the id or class. there is a custom attribute in the div element.
<div id="test" custom="tester">Get this text </div>
i tried the follow thing:
Element bedrijfwrapper = document.select("custom[name="tester"].first();
but i dont't get it to work. Can someone help me out?
Upvotes: 1
Views: 702
Reputation: 693
You should try this :
document.select('[custom="tester"]').first();
Good luck.
Upvotes: 1