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'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