使用PHP的Google原子入口XML

What is the proper way to extract information from this type of XML ? I tried this https://developers.google.com/apps-script/articles/XML_tutorial#index but it's outdated and in Java

<?xml version="1.0" encoding="utf-8"?>
<atom:entry xmlns:atom="http://www.w3.org/2005/Atom" xmlns:apps="http://schemas.google.com/apps/2006">
<apps:property name="enable" value="true" />
<apps:property name="subject" value="Out of office" />
<apps:property name="message" value="If it&#39;s urgent you can contact me on 555-5555." />
<apps:property name="contactsOnly" value="true" />
<apps:property name="domainOnly" value="false" />
<apps:property name="startDate" value="2011-06-20" />
<apps:property name="endDate" value="2011-06-23" />
</atom:entry>

or this one ?

   <atom:entry>
    <atom:id>https://apps-apis.google.com/a/feeds/emailsettings/2.0/example.com/venu/signature</atom:id>
    <atom:updated>2009-04-17T15:29:21.064Z</atom:updated>
    <atom:link rel='self' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/emailsettings/2.0/example.com/venu/signature'/>
    <atom:link rel='edit' type='application/atom+xml' href='https://apps-apis.google.com/a/feeds/emailsettings/2.0/example.com/venu/signature'/>
    <apps:property name='signature' value='Regards from Venu at the help desk'/>
   </atom:entry>

I can do it by adding ?alt=json at the end of the GET adress and then using json_decode($response,true); to turn in in to array, but there must be a more easy and less resource consuming way

I found this answer for the signature part (second xml) http://stackoverflow.com/questions/4043183/using-php-to-manage-gmail-mail-filter-xml-files/12245227#12245227 but still having problems for the first one

Thanks

UPDATED

You can go through the feed using simpleXML like this:

$url = "http://organic.com.au/news/atom.xml";
$xml = simplexml_load_file($url) or die("Error: Cannot create object");
echo "<pre>";
echo "number of entries: " . count($xml->entry) . "<br/>";
echo "latest entry: " . $xml->entry[count($xml->entry) - 1 ]->summary . "<br/>";
echo "access third entry: " . $xml->entry[2]->summary . "<br/><br/>";
htmlspecialchars(print_r($xml));    // map the whole file
echo "</pre>";

Thats the easiest way to read XML feeds in php. However, SimpleXML reads the whole file to memory, so if you have feeds that are above 50MB you might ewant to stream the file and read it in chunks.