Jak parsować zawartość XML CDATA XML za pomocą SimpleXML?
Próbuję wyświetlić zawartość Xml w tabelach, wszystkie działają idealnie, ale niektóre treści w tagu, których nie chcę wyświetlać, chcę tylko obraz, ale nie
Kalendarz z listopada 2012 r. Od 5.10 Test
jak w xml, <content:encoded><![CDATA[<p>November 2012 calendar from 5.10 The Test</p>
<p><a class="shutterset_" href='http://trance-gemini.com/wordpress/wp-content/gallery/calendars/laura-bertram-trance-gemini-145-1080.jpg' title='<br>November 2012 calendar from 5.10 The Test<br> <a href="</a></p>]]>
</content:encoded>
Chcę wyświetlić obraz, ale nie
Kalendarz z listopada 2012 r. Od 5.10 Test
.<?php
// load SimpleXML
$item = new SimpleXMLElement('test1.xml', null, true);
echo <<<EOF
<table border="1px">
<tr cl>
</tr>
EOF;
foreach($item->channel->item as $boo) // loop through our books
{
echo <<<EOF
<tr>
<td rowspan="3">{$boo->children('content', true)->encoded}</td>
<td>{$boo->title}</td>
</tr>
<tr>
<td>{$boo->description}</td>
</tr>
<tr>
<td>{boo->comments}</td>
</tr>
EOF;
}
echo '</table>';
?>