xml help
Posted: Fri May 16, 2014 6:37 pm
About the xml below, how I can read a especific value of especific node? If a do xmlNode := xmlIter:Find('CNPJ') i get the first node (<emit>) CNPJ value 7094099400877. But I want to get directly the value of CNPJ in node <dest>
Thanks in advance.
- <emit>
<CNPJ>70940994008277</CNPJ>
<xNome>PANDURATA ALIMENTOS LTDA.EXTR. KM 937,2 ESTAB.170</xNome>
<xFant>PANDURATA/82</xFant>
- <enderEmit>
<xLgr>ROD BR-381 FERNAO DIAS</xLgr>
<nro>K 937</nro>
<xCpl>2 S/N</xCpl>
<xBairro>ROSEIRA</xBairro>
<cMun>3125101</cMun>
<xMun>EXTREMA</xMun>
<UF>MG</UF>
<CEP>37640000</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
</enderEmit>
<IE>2512872330491</IE>
<CRT>3</CRT>
</emit>
- <dest>
<CNPJ>01937635000859</CNPJ>
<xNome>SONDA SUPERM EXP IMP LTDA</xNome>
- <enderDest>
<xLgr>AV SENADOR TEOTONIO VILELA</xLgr>
<nro>5800</nro>
<xBairro>JARDIM SAO JOSE</xBairro>
<cMun>3550308</cMun>
<xMun>SAO PAULO</xMun>
<UF>SP</UF>
<CEP>04804000</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
<fone>1131790160</fone>
</enderDest>
<IE>115051646110</IE>
</dest>
Thanks in advance.
- <emit>
<CNPJ>70940994008277</CNPJ>
<xNome>PANDURATA ALIMENTOS LTDA.EXTR. KM 937,2 ESTAB.170</xNome>
<xFant>PANDURATA/82</xFant>
- <enderEmit>
<xLgr>ROD BR-381 FERNAO DIAS</xLgr>
<nro>K 937</nro>
<xCpl>2 S/N</xCpl>
<xBairro>ROSEIRA</xBairro>
<cMun>3125101</cMun>
<xMun>EXTREMA</xMun>
<UF>MG</UF>
<CEP>37640000</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
</enderEmit>
<IE>2512872330491</IE>
<CRT>3</CRT>
</emit>
- <dest>
<CNPJ>01937635000859</CNPJ>
<xNome>SONDA SUPERM EXP IMP LTDA</xNome>
- <enderDest>
<xLgr>AV SENADOR TEOTONIO VILELA</xLgr>
<nro>5800</nro>
<xBairro>JARDIM SAO JOSE</xBairro>
<cMun>3550308</cMun>
<xMun>SAO PAULO</xMun>
<UF>SP</UF>
<CEP>04804000</CEP>
<cPais>1058</cPais>
<xPais>BRASIL</xPais>
<fone>1131790160</fone>
</enderDest>
<IE>115051646110</IE>
</dest>