public function tagemit($cnpj = '', $cpf = '', $xNome = '', $xFant = '', $numIE = '', $numIEST = '', $numIM = '', $cnae = '', $crt = '')
{
$identificador = 'C01 <emit> - ';
$this->emit = $this->dom->createElement("emit");
if ($cnpj != '') {
$this->dom->addChild($this->emit, "CNPJ", $cnpj, true, $identificador . "CNPJ do emitente");
} else {
$this->dom->addChild($this->emit, "CPF", $cpf, true, $identificador . "CPF do remetente");
}
$this->dom->addChild($this->emit, "xNome", $xNome, true, $identificador . "Razão Social ou Nome do emitente");
$this->dom->addChild($this->emit, "xFant", $xFant, false, $identificador . "Nome fantasia do emitente");
$this->dom->addChild($this->emit, "IE", $numIE, true, $identificador . "Inscrição Estadual do emitente");
$this->dom->addChild($this->emit, "IEST", $numIEST, false, $identificador . "IE do Substituto Tributário do emitente");
$this->dom->addChild($this->emit, "IM", $numIM, false, $identificador . "Inscrição Municipal do Prestador de Serviço do emitente");
$this->dom->addChild($this->emit, "CNAE", $cnae, false, $identificador . "CNAE fiscal do emitente");
$this->dom->addChild($this->emit, "CRT", $crt, true, $identificador . "Código de Regime Tributário do emitente");
return $this->emit;
}