I may be missing something really obvious but this
<?php
$string = <<<XML
<a>
<b>
<c>text</c>
<c>stuff</c>
</b>
<d>
<c>code</c>
</d>
</a>
XML;
$xml = new SimpleXMLElement($string);
echo $xml->asXML();
is supposed to output the below according to php.net.
<?xml version="1.0"?>
<a>
<b>
<c>text</c>
<c>stuff</c>
</b>
<d>
<c>code</c>
</d>
</a>
Not the case, it is, in fact, outputting the below (for me at least). Does anyone have any ideas?
text stuff code