↧
Answer by IMSoP for read cdata from a rss feed
The above "fix" will work, but is entirely unnecessary.SimpleXML objects contain a lot of "magic", and are not designed to be viewed using print_r; the CDATA is safely in your object, but won't show up...
View ArticleAnswer by hakre for read cdata from a rss feed
Tell SimpleXML to convert CDATA into normal texts:$homepage = 'http://www.forbes.com/news/index.xml';$movies = simplexml_load_file($homepage, "SimpleXMLElement", LIBXML_NOCDATA);That should do it for...
View Articleread cdata from a rss feed
I'm reading a rss feed using simple code:<?php$homepage = file_get_contents('http://www.forbes.com/news/index.xml');$movies = new SimpleXMLElement($homepage);echo...
View Article