This is part of XML document:
<entry>
<author>
      <name>Dunnock_D</name>
      <uri>http://www.flickr.com/people/dunnock_d/</uri>
 </author>
    <link rel="license" type="text/html" href="https://creativecommons.org/licenses/by-nc/2.0/deed.en" />
    <link rel="enclosure" type="image/jpeg" href="http://farm8.staticflickr.com/7548/26820724620_1d221c3187_b.jpg" />
</entry> 
My code:
$xml = simplexml_load_string($result);
    foreach ($xml->entry as $pixinfo) {
       echo $pixinfo->link[1]['href'];
    } 
The problem is there can be one or more link strings and I need only particular with rel="enclosure" attribute. What is the easiest way without extra IF and loops?
Thank you!
 
     
     
    