I\'m creating a xml using this
$customXML = new SimpleXMLElement(\' \');
after adding some attributes onto this, when
A practical solution: you know that the first occurrence of ?> in the result string is going to be then end of the xml version substring. So:
$customXML = new SimpleXMLElement(' ');
$customXML = substr($customXML, strpos($customXML, '?'.'>') + 2);
Note that ?> is split into two parts because otherwise some poor syntax highlighter may have problems parsing at this point.