- simplexml_load_string: documentation ( source)
<?php
$buffer = <<<XML
<tr>
<td>http://www.example.co.uk/the-view-from-22/feed/</td>
<td>Example Blogs » The View from 22 » Example Blogs</td>
<td>http://blogs.example.co.uk/</td>
<td><![CDATA[Listen: The Example’s verdict on the debate]]></td>
<td>http://blogs.example.co.uk/coffeehouse/2015/04/podcast-special-the-debate/</td>
</tr>
XML;
$xml = simplexml_load_string($buffer);
$xml->asXML('php://output');
$doc = new DOMDocument();
$doc->presverWhitespace = false;
$doc->formatOutput = true;
$doc->loadXML($xml->asXML());
$doc->save('php://output');