I\'m creating a xml using this
$customXML = new SimpleXMLElement(\'\');
after adding some attributes onto this, when
echo preg_replace("/<\\?xml.*\\?>/",'',$doc->saveXML(),1);