I'm scanning a webpage for images and I only want the first image it finds.
Here's my xpath
:
$image = '//div[@id="content"]//div[@class="entry"]//(img)[1]//@src';
Im getting a blank array though.
What am I doing incorrectly?
<html>
<body>
<div id="content">
<div class="entry">
<img src="someimagesource.jpg"/>
<img src="someimagesource123.jpg"/>
</div>
</div>
</body>
</html>