have a code like this:
<a href='www.link_not_required.com'>
<a href='www.link_not_required.com'>
<a href='www.link_1.com'><img src='image_1.png'></a>
<a href='www.link_2.com'><img src='image_2.png'></a>
<a href='www.link_3.com'><img src='image_3.png'></a>
<a href='www.link_4.com'><img src='image_4.png'></a>
<img src='image_not_required.png'>
<img src='image_not_required.png'>
I want to extract hrefs of only anchors which contain images and also src of those images ? I don't want links of anchors which do not contain images and also srcs of images which are not anchors.
How do I do this ? Can it be done using Simplehtmldom library?