This is a sample of a problem with XML. Specifically, it doesn't read
the data
It's been reported that it worked fine on June 2016.
#include 'hbxml.ch'
#define CRLF chr(13)+chr(10)
REQUEST DBFCDX
//--c-//
function XML2RK()
LOCAL oXmlDoc,oXmlNode, oXmlRecScan, oXmlFieldScan
LOCAL set_4_, cFilename, cString, OXMLNODE00, OXMLRECSCAN0, OXMLNODE0,
tnumer, tdata, tnetto
setmode(25,80)
cls
set_4_:=set(4,'-mm-dd')
begin sequence
cFileName := 'demo.xml'
If !file(cFileName)
break
Endif
cString:=Memoread( cFileName )
// cString:=strtran(cString,'','')
oXmlDoc := TXmlDocument():new(,5) // ,HBXML_STYLE_NOESCAPE ) //
HBXML_TYPE_CDATA HBXML_STYLE_NOESCAPE
if !( oXmlDoc:nError==HBXML_ERROR_NONE )
wait "xml file parsing error " + str(oXmlDoc:nError)
break
endif
oXMlDoc:read( cString )
oXmlNode00 := oXmlDoc:findFirst( "ROOT" )
oXmlRecScan0 := TXmlIteratorScan():new( oXmlNode00 )
oXmlNode0 := oXmlRecScan0:find( "REJESTRY_SPRZEDAZY_VAT" )
DO WHILE oXmlNode0 <> NIL
// oXmlFieldScan0 := TXmlIteratorScan():new( oXmlNode0 )
oXmlRecScan := TXmlIteratorScan():new( oXmlNode0 )
oXmlNode := oXmlRecScan:find( "REJESTR_SPRZEDAZY_VAT" )
DO WHILE oXmlNode <> NIL
tNUMER:=''
tDATA:=''
tNETTO:=''
oXmlFieldScan := TXmlIteratorScan():new( oXmlNode )
oXmlNode := oXmlFieldScan:find( "DATA" )
if oXmlNode#NIL
if oXmlNode:cData#NIL
tData:=oXmlNode:cData
endif
endif
oXmlNode := oXmlFieldScan:find( "NUMER" )
if oXmlNode#NIL
if oXmlNode:cData#NIL
tNUMER:=oXmlNode:cData
endif
endif
oXmlNode := oXmlFieldScan:find( "NETTO" )
if oXmlNode#NIL
if oXmlNode:cData#NIL
tNETTO:=oXmlNode:cData
endif
endif
alert('Data:'+tDATA+' '+'Numer:'+tNUMER+' '+'Netto:'+tNETTO)
oXmlNode := oXmlRecScan:next("REJESTR_SPRZEDAZY_VAT")
ENDDO
oXmlNode0 := oXmlRecScan0:next("REJESTRY_SPRZEDAZY_VAT")
ENDDO
end sequence
dbcloseall()
set(4,set_4_)
return nil
http://www.comarch.pl/cdn/optima/offline;>
2.00
SPRZE
KSIEG
1400
EMG
--
http://www.emagsoftware.it
http://www.emagsoftware.it/emgmusic
http://www.emagsoftware.it/spectrum
http://www.emagsoftware.it/tbosg
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
xHarbour-developers mailing list
xHarbour-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xharbour-developers