
<?php
SimpleXMLElement::__set_state(array(
   'title' => 'CS grad student presents his research in France',
   'link' =>
  array (
    0 =>
    SimpleXMLElement::__set_state(array(
       '@attributes' =>
      array (
        'rel' => 'alternate',
        'type' => 'text/html',
        'href' => 'http://college.edu/article/2007-10-03-cs_grad_student_presents_his_research_in_france',
      ),
    )),
    1 =>
    SimpleXMLElement::__set_state(array(
       '@attributes' =>
      array (
        'rel' => 'enclosure',
        'type' => 'image/jpeg',        'href' => 'http://college.edu/files/images/0609-59+043+.feature.jpg',

        'title' => '0609-59 043 .jpg',
      ),
    )),
  ),
   'id' => 'http://college.edu/article/2007-10-03-cs_grad_student_presents_his_research_in_france',
   'published' => '2007-10-03T10:25:47-06:00',
   'updated' => '2007-10-03T10:30:10-06:00',
   'author' =>
  SimpleXMLElement::__set_state(array(
     'name' => 'Computer Science Department',
  )),
   'category' =>
  SimpleXMLElement::__set_state(array(
     '@attributes' =>
    array (
      'term' => 'Feature Story',
    ),
  )),
   'summary' =>
  SimpleXMLElement::__set_state(array(
     '@attributes' =>
    array (
      'type' => 'html',
    ),
  )),
   'content' =>
  SimpleXMLElement::__set_state(array(
     '@attributes' =>
    array (
      'type' => 'html',
    ),
  )),
))
?>

<?php
  $image = array();
    if ($news->link[1]) {
      foreach($news->link[1]->attributes() as $name => $value){
        if($name == 'href'){
        $image[] = array('url' =>  $value);
        break;
      }
    }
  }
?>