FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xml help
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
xml help
Posted: Fri May 16, 2014 06: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>
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: xml help
Posted: 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
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: xml help
Posted: Mon May 19, 2014 03:53 PM

Thank you Antonio.

Continue the discussion