I don't have much experience with xPath, but you could try the following:
$imgs = $xml->xpath('item//img');
This will select all img
-elements which are inside item
-elements, regardless if there are other elements inbetween. Removing the leading slash will search for item
anywhere in the documet, not just from the root. Otherwise, you'd need something like /rss/channel/item...
.
As for displaying the images: Just output <img>
-tags followed by line-breaks, like so:
foreach($imgs as $image) { echo '<img src="' . $image->src . '" /><br />';}
The preferred way would be to use CSS instead of <br>
-tags, but I think they are simpler for a start.