$xml=base64_encode($xml_data);
$name = "FACTURA_{$codfactura}.xml";
file_put_contents(__DIR__ . "/../xml/$name", base64_decode($xml));