public function tagenderDest($xLgr = '', $nro = '', $xCpl = '', $xBairro = '', $cMun = '', $xMun = '', $siglaUF = '', $cep = '', $cPais = '', $xPais = '', $fone = '')
{
$identificador = 'E05 <enderDest> - ';
if (empty($this->dest)) {
throw new RuntimeException('A TAG dest deve ser criada antes do endereço do mesmo.');
}
$this->enderDest = $this->dom->createElement("enderDest");
$this->dom->addChild($this->enderDest, "xLgr", $xLgr, true, $identificador . "Logradouro do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "nro", $nro, true, $identificador . "Número do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "xCpl", $xCpl, false, $identificador . "Complemento do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "xBairro", $xBairro, true, $identificador . "Bairro do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "cMun", $cMun, true, $identificador . "Código do município do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "xMun", $xMun, true, $identificador . "Nome do município do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "UF", $siglaUF, true, $identificador . "Sigla da UF do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "CEP", $cep, false, $identificador . "Código do CEP do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "cPais", $cPais, false, $identificador . "Código do País do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "xPais", $xPais, false, $identificador . "Nome do País do Endereço do Destinatário");
$this->dom->addChild($this->enderDest, "fone", $fone, false, $identificador . "Telefone do Endereço do Destinatário");
$node = $this->dest->getElementsByTagName("indIEDest")->item(0);
if (!isset($node)) {
$node = $this->dest->getElementsByTagName("IE")->item(0);
}
$this->dest->insertBefore($this->enderDest, $node);
return $this->enderDest;
}