I have the following html text :
<div>
<p>
"Text one"
<br>
"Text two"
<br>
"Text three"
<br>
"Text four"
</p>
</div>
I need to select only "Text two" and "Text three" using xpath. So far I have the following xpath which selects the entire text:
text = doc.xpath('/div/p/text()')
Though I expect the result to be :
Text two
Text three
How can I achieve this?