Reputation: 11
<div class="content pb10">
some text<img src="URL"/>
</div>
Like this. I want to use XPath to get text with img tag
some text<img src="URL"/>
Upvotes: 1
Views: 931
Reputation: 111501
This XPath,
/div[@class='content pb10']/node()
will select all children nodes of that div
, including text nodes and elements, as requested.
Upvotes: 1