<event:event>
         <event:sessionKey></event:sessionKey>
         <event:sessionName>Learn QB in Minutes</event:sessionName>
         <event:sessionType>9</event:sessionType>
         <event:hostWebExID></event:hostWebExID>
         <event:startDate>02/12/2009</event:startDate>
         <event:endDate>02/12/2009</event:endDate>
         <event:timeZoneID>11</event:timeZoneID>
         <event:duration>30</event:duration>
         <event:description></event:description>
         <event:status>NOT_INPROGRESS</event:status>
         <event:panelists></event:panelists>
         <event:listStatus>PUBLIC</event:listStatus>
      </event:event>


foreach($sxml->xpath('//event:event') as $event) {
 var_export($event->xpath('event:sessionKey'));
}


<channel>
    <yweather:location city="Wakefield" region="RI"   country="US"/>
    <yweather:units temperature="F" distance="mi" pressure="in" speed="mph"/>
    <yweather:wind chill="59"   direction="150"   speed="9" />
    <yweather:atmosphere humidity=""  visibility=""  pressure="30.05"  rising="2" />
    <yweather:astronomy sunrise="6:55 am"   sunset="6:08 pm"/>
</channel>

foreach($sxml->channel as $channel) {
 var_export($channel->xpath('yweather:astronomy'));
}

EXAMPLE:
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',
      ),
    )),
  ),
  
<?php
  $image = array();
    if ($news->link[1]) {
      foreach($news->link[1]->attributes() as $name => $value){
        if($name == 'href'){
        $image[] = array('url' =>  $value);
        break;
      }
    }
  }
?>
MINE:
array
(
    0 =>
    SimpleXMLElement::__set_state(array(
            '@attributes' =>
            array
            (
                'sunrise' => '6:55 am',
                'sunset' => '6:08 pm',
            ),
        )
    ),
)
<?php
  $sunrise = array();
    if ($astronomy->attributes()) {
      foreach($astronomy->attributes() as $name => $value){
        if($name == 'sunrise'){
        $sunrise[] = array('time' =>  $value);
        break;
      }
    }
  }
?>

