atom.xml retrieve link ....
Posted: Sat Aug 18, 2007 4:52 am
Hello,
I have php code question. I would like to retrieve its link from atom, but I don't know which object that I can use in php to retrieve it. The link tag looks different from the others. <link rel="alternate" href="XXX.html".... />. I used
My code doesn't work. It returns empty string. How do I retrieve the link tag which has href attributes... Can anyone help? I believe "link" is not considered as a tag afterall.. but which object in php I should use to solved this problem? any idea? help ...
Thanks
I have php code question. I would like to retrieve its link from atom, but I don't know which object that I can use in php to retrieve it. The link tag looks different from the others. <link rel="alternate" href="XXX.html".... />. I used
Code: Select all
$dom = domxml_open_mem($xml);
$root = $dom->document_element();
$link = $root->get_element_by_tagname("link");
... loop
<a href='".$link[$i]->get_content()."' .....></a>Thanks