I've this piece of code taken by a .atom document wrapped with file_get_contents:
<entry>
<link type="text/html" rel="alternate" href="..."/>
</entry>
My goal is to extract the first URL into the href attribute in the entry tag, i tried to parse with:
$xml = new SimpleXMLElement($XML_file);
$link = $xml->entry[0]->link;
print $link;
But shell does not give me any output.