Quantcast
Channel: read cdata from a rss feed - Stack Overflow
Browsing latest articles
Browse All 3 View Live

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 Article



Answer 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 Article

read 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
Browsing latest articles
Browse All 3 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>