xml help

xml help

Postby Wanderson » 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>
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm

Re: xml help

Postby Antonio Linares » Sat May 17, 2014 11:19 am

Wanderson,

You may review FWH\samples\xmlreader.prg and xmltree.prg which are good examples for using trees
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: xml help

Postby Wanderson » Mon May 19, 2014 3:53 pm

Thank you Antonio.
Wanderson
 
Posts: 332
Joined: Thu Nov 17, 2005 9:11 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 35 guests