I am trying to parse the rss xml feeder, but there is some content is missing while am parsing. I have attached my rss feed below and the response of parsing, please suggest me if is there any other way?
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<item>
<ids>701</ids>
<post_date>2015-10-30 12:51:30</post_date>
<post_content><blockquote>I personally feel that there is a need to re?invent the very dynamic of contemporary art, to approach it afresh... </blockquote>
Since 2008, the Devi Art Foundation has been making waves as a unique non?profit centre for contemporary artistic practice in India.
<strong>Heading:</strong> As founder of the Devi Art Foundation, you pioneered a unique and avant?
<strong>Anupam Poddar: </strong>There are many factors that culminated in the Foundation being established.
</post_content>
</item>
</channel>
And the response is like this
Array
(
[@attributes] => Array
(
[version] => 2.0
)
[channel] => Array
(
[item] => Array
(
[0] => Array
(
[ids] => 701
[post_date] => 2015-10-30 12:51:30
[post_content] => Array
(
[blockquote] => I personally feel that there is a need to re?invent the very dynamic of contemporary art, to approach it afresh...
[strong] => Array
(
[0] => Heading:
[1] => Anupam Poddar:
)
)
)
)
)
)
And my parsing method is
$xml = simplexml_load_string($details, "SimpleXMLElement", LIBXML_NOCDATA);
$json = json_encode($xml);
$array = json_decode($json, TRUE);
If you're missing some content it's caused by poor design of this feed (each value should be bordered by an element) so it can't be completly parsed via simplexml_load_* functions.
If you need to use this feed you need to parse it by some regex function or maybe there are some libraries which can parse those feeds too.