I'm trying to retrieve posts from a Blogger using PHP and XML:
$file="BLOG URL/atom.xml";
$xml = simplexml_load_file($file);
And making a simple loop:
foreach ($xml->entry as $foo) {
echo '<h2>' . $foo->title . '</h2>';
echo '<p>' . $foo->updated . '</p>';
echo $foo->link;
}
The only problem is that link is not showed.
Inspecting the code, each post has more than one link node:
<link href="" rel="replies" title="Postar comentários" type="application/atom+xml"/>
<link href="" rel="replies" title="0 Comentários" type="text/html"/>
<link href="" rel="edit" type="application/atom+xml"/>
<link href="" rel="self" type="application/atom+xml"/>
<link href="" rel="alternate" title="" type="text/html"/>
Is possible to get a node by his type atributte?