I have the following example
<div class="myClass">
<div>
<div>
<p>1</p>
</div>
</div>
<p>2</p>
<div>
</div>
<p>3</p>
</div>
How can I extract the 3 p tags using goquery or CSS selectors (or both) Maybe in this case the selector would be "div.myClass"
You can select all child elements of
.myClasswith a selector like this:A guide about descendant selectors can be found here.