I am really not into php, but here is what a small search lead me to.
In order to remove the doctype associated with your root <svg>
element, you would have to import this element inside a new, clean, DOMDocument.
From there, you'll be able to call this DOMDocument's ::saveXML(DOMNode) method, and the original noise will be gone.
$xml = simplexml_load_file($file);
$cleanDom = new DOMDocument();
$node = dom_import_simplexml($xml);
$clone = $cleanDom -> importNode($node, true);
$cleanMarkup = $cleanDom -> saveXML($clone);