simplexml_import_dom - как получить CDATA
При наличии CDATA в тегах выводится пустота. Подскажите, как добавить возможность чтения данного тега ?
function openXML($file_name,$key,$limit=0){
$z = new XMLReader;
$z->open($file_name);
$doc = new DOMDocument;
$result = array();
while ($z->read() && $z->name !== $key);
$i = 0;
while ($z->name === $key)
{
$fdfsd = @$z->expand();
if(!$fdfsd){
$result='error_end_tag';
break;
}
$df = $doc->importNode($fdfsd, true);
$node = simplexml_import_dom($df);
$i++;
$z->next($key);
$result[]=$node;
if($limit>0 && $i==$limit)
break;
}
return $result;
}