The news company sent another rss news feed.
They sent a link to rss, where CDATA used.
How to read this CDATA ?
- rss file
1 answer
To parse an RSS file, it is convenient to use the function simplexml_load_file() , in order to access the elements inside <![CDATA[ , it should be passed as the third parameter to the constant LIBXML_NOCDATA , which instructs to convert these elements into text
<?php $url = 'http://krsk.sibnovosti.ru/news/rss_all.xml'; $xml = simplexml_load_file($url, "SimpleXMLElement", LIBXML_NOCDATA); echo "<pre>"; print_r($xml); |
rss(programming language, library, etc.)? - Streletz