Im having a problem getting a namespaced (Or semi-colin’) item with PHP’s SimpleXML. I’ve done a little digging through google and tried the likes if asXML but im back at square one.
The part I can’t get < content:encoded >
http://content.sportsdatallc.com/?feed=rss2&cat=364
PHP
$xml = new SimpleXMLElement($response, LIBXML_NOCDATA);
print_r($xml);
I can get all the nodes that I need, except for that piece above. If i print_r it doesnt showup.
I have also tried this:
$xml = new SimpleXMLElement($response, LIBXML_NOCDATA);
foreach ($xml->channel->item as $item)
{
echo 11;
$art = $item->children('content:encoded');
print_r($art);
}
Simple solution str_replace the content:encoded with content.
It may not be the best solution but it is simple and it works 🙂