Ii have the follow structure:
<div class="xGh" style="background-image: url('name_file.jpg');"></div>
I need that output:
name_file.jpg
I try use that answer, but dont work fo me :
$img = $xpath->query(substring-before(substring-after(//div[@class='xGh']/@style, "background-image: url('"), "')"));
echo $img->item($i)->nodeValue."<br/>";
Look the error:
Test Ideone with error
I have some error in that sintaxe i cant see how is correct...
sry my english