I have the following html:
<div>
<h1>
<a>1</a>
</h1>
<h2>
<a>2<a>
</h2>
<h3>
<a>3</a>
</h3>
</div>
Is there a better way to select all anchors than div > h1 > a, div > h2 > a, div > h3 > a. I'm looking for something like div > (h1,h2,h3) > a
Thanks, Trung
It's possible to achieve this:
div.select("h1,h2,h3").select("a");
alternatively, if you just need the anchors inside of the div:
div.select("a");