Given a WordPress RSS feed, I would like to know how can I get all the tags for each post. As far as I can see, for each tag there’s an entry like this <category><![CDATA[ ]]></category>. I’m using PHP’s SimpleXmlElement.
Thank you.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use
SimpleXMLElement::xpathto do this. So:The only disadvantage here is you must pass the XML for only one item at a time. If you know which items you wish to use, change it to
$x->channel->item[0]->xpath('.//category')for the first item, etc.