I'm trying to get the img url of a html file using XPath
For example :
My XPath Select
//div[contains(@class,'content')]/p//@src
The result is :
<div class="entry-content clearfix single-post-content" style="background-color: transparent;">
<p style="background-color: transparent;">
<img src="https://example.com/0.jpg" alt="example" style="background-color: transparent;">
<img src="https://example.com/1.jpg" alt="example">
<img src="https://example.com/2.jpg" alt="example">
<img src="https://example.com/3.jpg" alt="example">
</p>
And i want to store the text so i use
string(//div[contains(@class,'content')]/p//@src)
But the result show me only
Is there any way i can get all the URL ?