chiaramente si può fare in vari modi, anche con il parsing, ma volendo anche:

Codice PHP:
...
$xml = $proc->transformToXML($xmlDoc);
$xml = str_replace('<?xml version="1.0"?>', '', $xml);
echo $xml;