Hi,
I have a program that produce .csv and store it on IFS and that csv is later ftp'ed. It is more like a flat file (without headers in first row, headers are just 1st field in each row).
I need to move from CSV to an XML and that whole .csv is just one element tag(sic!)in that new XML. Final step is to POST it with HTTP.
Sadly, I can't go to REST & JSON as I could use new HTTP_POST or use Scott YAJL.
I'm trying to find a simplest way to do that and I found just two but I have not tested them yet but maybe there are better options.
1. Simple aka stupid and may not work: Read the content of CSV from IFS into variable in RPG, read the xml file as an variable(XML will be quite small) and then just use %replace and send that text with web service
2. Read XML into SQL table, put csv into another column in same/different table and by using XML scalar functions(XMLELEMENT,XMLDOCUMNET etc) build new xml which can be POST using HTTP.
I think both should work but, of course, I will be grateful for any suggestions. I do not want fall into any trap....
Filip Drzewiecki
RPG Developer
e-mail: fdrzewiecki@xxxxxxxxxxxxxxxxx<mailto:fdrzewiecki@xxxxxxxxxxxxxxxxx>
kom.: +48 608 438 591
[cid:image001.png@01D7F67F.CFD08DF0]
Objectivity Sp. z o.o.
ul. Strzegomska 142a, 54-429 Wroclaw, Poland
e-mail: info@xxxxxxxxxxxxxxxxx<mailto:info@xxxxxxxxxxxxxxxxx>
[cid:image002.png@01D7F67F.CFD08DF0]<
http://www.objectivity.co.uk/>
[cid:image003.png@01D7F67F.CFD08DF0]
Objectivity Sp. z o.o. is a 100% subsidiary of Objectivity Ltd.
Statutory information: NIP: 8942941304 | REGON: 020745428 | Sad Rejonowy dla Wroclawia-Fabrycznej | VI Wydzial Gospodarczy Krajowego Rejestru Sadowego | KRS: 0000303475 | Kapital zakladowy: 500 000 PLN
This email and the information it contains are confidential. If you have received this email in error please notify the sender immediately.
As an Amazon Associate we earn from qualifying purchases.