txt2xml() public méthode

txt2xml Converte uma ou multiplas NF em formato txt em xml
public txt2xml ( mixed $txt ) : array
$txt mixed Path para txt, txt ou array de txt
Résultat array
<?php

error_reporting(E_ALL);
ini_set('display_errors', 'On');
require_once '../../bootstrap.php';
use NFePHP\NFe\ConvertNFe;
$convert = new ConvertNFe();
$txtfile = '../xml/NOTAFISCAL310.txt';
$aNFe = $convert->txt2xml($txtfile);
header("Content-Type:text/xml");
echo $aNFe[0];