Reputation: 2726
I have the following HTML:
<div class="container">
<div class="inner_container">
This is <strong>text</strong> I don't want to extract.
</div>
</div>
<br/>This is the text I'd like Xpath to extract
Using xpath, how can I extract "This is the text I'd like Xpath to extract"
Upvotes: 0
Views: 166
Reputation: 1614
In case the provided HTML is just a fragment and there is a single root element, the text can be selected by the following XPath expression:
//br/following-sibling::text()[1]
Upvotes: 1