Hi,
Does anyone already create this for (x)Harbour?
I found some tools that create source-code for JAVA ,C++, or C based on a XSD-scheme, but not for (x)Harbour
Regards,
Marc
<?xml version="1.0" encoding="windows-1250"?>
<?xml-stylesheet type="text/xsl" href="http://edavki.durs.si/Documents/Transforms/DDV_O_5.3-display-sl.xslt"?>
<Envelope xmlns="http://edavki.durs.si/Documents/Schemas/DDV_O_5.xsd" xmlns:edp="http://edavki.durs.si/Documents/Schemas/EDP-Common-1.xsd">
<edp:Header>
<edp:taxpayer>
<edp:taxNumber>89646525</edp:taxNumber>
<edp:taxpayerType>PO</edp:taxpayerType>
<edp:name>NAME OF FIRM</edp:name>
<edp:address1>STREET</edp:address1>
<edp:city>CITY</edp:city>
<edp:maticnaStevilka>53434345021000</edp:maticnaStevilka>
<edp:resident>true</edp:resident>
</edp:taxpayer>
<edp:domain>edavki.durs.si</edp:domain>
</edp:Header>
<edp:Signatures />
<body>
<edp:bodyContent />
<DDV-O>
<taxPeriodStart>2009-01-01</taxPeriodStart>
<taxPeriodEnd>2009-01-31</taxPeriodEnd>
<f03>false</f03>
<f04>false</f04>
<f11>119316.00</f11>
<f12>4423.00</f12>
<f13>0.00</f13>
<f14>0.00</f14>
<f15>0.00</f15>
<f21>23863.00</f21>
<f22>0.00</f22>
<f23>3307.00</f23>
<f24>0.00</f24>
<f25>0.00</f25>
<f26>0.00</f26>
<f31>44848.00</f31>
<f32>16534.00</f32>
<f33>2025.00</f33>
<f34>0.00</f34>
<f35>0.00</f35>
<f41>12130.00</f41>
<f42>62.00</f42>
<f43>0.00</f43>
<f51>14978.00</f51>
<f52>0.00</f52>
<exchangeRate>239.64</exchangeRate>
</DDV-O>
</body>
</Envelope>
STATIC FUNCTION Obrazec_XML(oDlg)
LOCAL aGets:= oDlg:cargo
LOCAL d1, d2
cFile:= alltrim(aGets[1]:editbuffer())
Zbrisi_Porocilo(cFile)
SET DATE FORMAT TO "yyyy-mm-dd"
d1:=dtoc(oDatum1)
d2:=dtoc(oDatum2)
SET DEVICE TO print
SET PRINTER TO "&pot_xml"+cFile
//*** Sifra, tip klienta ***
DO CASE
CASE x_tip_pod="P"; cTxt1:="PO"
CASE x_tip_pod="F"; cTxt1:="SP"
OTHERWISE ; cTxt1:="PO"
ENDCASE
vrsta:=0
@ vrsta,0 say '<?xml version="1.0" encoding="windows-1250"?>'
vrsta++
@ vrsta,0 say '<?xml-stylesheet type="text/xsl" href="http://edavki.durs.si/Documents/Transforms/DDV_O_5.3-display-sl.xslt"?>'
vrsta++
@ vrsta,0 say '<Envelope xmlns="http://edavki.durs.si/Documents/Schemas/DDV_O_5.xsd" xmlns:edp="http://edavki.durs.si/Documents/Schemas/EDP-Common-1.xsd">'
vrsta++
@ vrsta,0 say '<edp:Header>'
vrsta++
@ vrsta,0 say '<edp:taxpayer>'
vrsta++
//*** davcno stevilko napisi brez "SI" ***
IF SUBSTR(XDAVCNA,1,2)="SI"
@ vrsta,0 say '<edp:taxNumber>'+substr(XDAVCNA,3,8)+'</edp:taxNumber>'
ELSE
@ vrsta,0 say '<edp:taxNumber>'+alltrim(XDAVCNA)+'</edp:taxNumber>'
ENDIF
vrsta++
@ vrsta,0 say '<edp:taxpayerType>'+cTxt1+'</edp:taxpayerType>'
vrsta++
@ vrsta,0 say '<edp:name>'+alltrim(ConvToAnsiCP(XNAZIV))+'</edp:name>'
vrsta++
@ vrsta,0 say '<edp:address1>'+alltrim(ConvToAnsiCP(XNASLOV))+'</edp:address1>'
vrsta++
@ vrsta,0 say '<edp:city>'+alltrim(ConvToAnsiCP(XKRAJ2))+'</edp:city>'
vrsta++
@ vrsta,0 say '<edp:maticnaStevilka>'+alltrim(XMATICNA)+'</edp:maticnaStevilka>'
vrsta++
@ vrsta,0 say '<edp:resident>true</edp:resident>'
vrsta++
@ vrsta,0 say '</edp:taxpayer>'
vrsta++
@ vrsta,0 say '<edp:domain>edavki.durs.si</edp:domain>'
vrsta++
@ vrsta,0 say '</edp:Header>'
vrsta++
@ vrsta,0 say '<edp:Signatures />'
vrsta++
@ vrsta,0 say '<body>'
vrsta++
@ vrsta,0 say '<edp:bodyContent />'
vrsta++
@ vrsta,0 say '<DDV-O>'
vrsta++
@ vrsta,0 say '<taxPeriodStart>'+alltrim(D1)+'</taxPeriodStart>'
vrsta++
@ vrsta,0 say '<taxPeriodEnd>'+alltrim(D2)+'</taxPeriodEnd>'
vrsta++
@ vrsta,0 say '<f03>false</f03>'
vrsta++
@ vrsta,0 say '<f04>false</f04>'
vrsta++
@ vrsta,0 say '<f11>'+alltrim(str(A11))+'.00</f11>'
vrsta++
@ vrsta,0 say '<f12>'+alltrim(str(A12))+'.00</f12>'
vrsta++
@ vrsta,0 say '<f13>'+alltrim(str(A13))+'.00</f13>'
vrsta++
@ vrsta,0 say '<f14>'+alltrim(str(A14))+'.00</f14>'
vrsta++
@ vrsta,0 say '<f15>'+alltrim(str(A15))+'.00</f15>'
vrsta++
@ vrsta,0 say '<f21>'+alltrim(str(A21))+'.00</f21>'
vrsta++
@ vrsta,0 say '<f22>'+alltrim(str(A22))+'.00</f22>'
vrsta++
@ vrsta,0 say '<f23>'+alltrim(str(A23))+'.00</f23>'
vrsta++
@ vrsta,0 say '<f24>'+alltrim(str(A24))+'.00</f24>'
vrsta++
@ vrsta,0 say '<f25>'+alltrim(str(A25))+'.00</f25>'
vrsta++
@ vrsta,0 say '<f26>'+alltrim(str(A26))+'.00</f26>'
vrsta++
@ vrsta,0 say '<f31>'+alltrim(str(A31))+'.00</f31>'
vrsta++
@ vrsta,0 say '<f32>'+alltrim(str(A32))+'.00</f32>'
vrsta++
@ vrsta,0 say '<f33>'+alltrim(str(A33))+'.00</f33>'
vrsta++
@ vrsta,0 say '<f34>'+alltrim(str(A34))+'.00</f34>'
vrsta++
@ vrsta,0 say '<f35>'+alltrim(str(A35))+'.00</f35>'
vrsta++
@ vrsta,0 say '<f41>'+alltrim(str(A41))+'.00</f41>'
vrsta++
@ vrsta,0 say '<f42>'+alltrim(str(A42))+'.00</f42>'
vrsta++
@ vrsta,0 say '<f43>'+alltrim(str(A43))+'.00</f43>'
vrsta++
@ vrsta,0 say '<f51>'+alltrim(str(A51))+'.00</f51>'
vrsta++
@ vrsta,0 say '<f52>'+alltrim(str(A52))+'.00</f52>'
vrsta++
@ vrsta,0 say '<exchangeRate>239.64</exchangeRate>'
vrsta++
@ vrsta,0 say '</DDV-O>'
vrsta++
@ vrsta,0 say '</body>'
vrsta++
@ vrsta,0 say '</Envelope>'
vrsta++
SET PRINTER TO
SET DEVICE TO SCREEN
RunShell("/C NOTEPAD "+"&pot_xml"+cFile,,.F.,.T.)
SET DATE TO SYSTEM
RETURN nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 96 guests