I am having trouble finding good xQuery tutorials, basically what I am trying to do is get the text etc...from this html node
<div class="venue">
<div class="vitem">
<p style="padding: 6px 0pt 0pt;" class="label">ADDRESS:</p>
<p class="item-big">blabla</p>
</div><br class="clear">
<div class="vitem">
<p style="padding: 6px 0pt 0pt;" class="label">PHONE:</p>
<p class="item-big">123</p>
</div><br class="clear">
<div class="vitem">
<p style="padding: 6px 0pt 0pt;" class="label">WEB:</p>
<p class="item-big">etc...</p>
</div><br class="clear">
</div>
I would like to know how I can get data from the second p in the third div[@class="vitem"]
Or p immediately after p[@class="label"]that contains the textWEB:
Edit: The answers have already helped, but my second question is that the layout will change to something like this
<div class="venue">
<div class="vitem">
<p style="padding: 6px 0pt 0pt;" class="label">ADDRESS:</p>
<p class="item-big">blabla</p>
</div><br class="clear">
<div class="vitem">
<p style="padding: 6px 0pt 0pt;" class="label">WEB:</p>
<p class="item-big">etc...</p>
</div><br class="clear">
</div>
How to get etc..., knowing only that it follows p with a class label containing text WEB:? it is no longer in div [3] / p [2]
Thank!
source
share