Page 4 of 4

Re: FROM XML TO DBF

Posted: Fri Apr 05, 2024 11:40 am
by dragancesu
Since we started using electronic invoices, there was a need to work with xml files

This is some of my solutions on how to export data from xml to a dbf file

step 1 : select xml file (analyse)
step 2 : mark which fields you want to overwrite in dbf
note: you have to mark one field as key, group, top level, I don't know what exactly it is called in the xml spec
step 3 : generate the program that will do it (build)
step 4 : compile it

XML is a powerful structure, so it can have the same field (by name) in several levels, such fields will appear only once, practically only the last appearance will be written

xml_fnc.prg contain one function need for generated program (program.prg)