We are doing an analysis for the best way to do XML processing on IBMi (v7r3m0) via RPG & SQL (preferred)For our XML processing we need to do :
a). XML outbound: Extract data from Db2 files on IBMi and build XML for sending to another system via web serviceb). XML inbound: Receive XML from another system via web service and populate D2b2 files on IBMi..
For Best way we are focusing on the "quickest development time" methodology,What are pros/cons .. But also let me know any other considerations for "best way"
So far the 2 methods that we are considering are listed below , but please let me know of any others.a). IBMi XML Tookkit 7.2 PDF file for XML Toolkit - IBM Documentation Let me know if can point me to any good doc /examples on using this method.
b). CGIDEV2 IBM ILE RPG CGI Tool Set (CGIDEV2) Library (easy400.net)including usage of : XML-SAX / XML-INTOUpdhtmlvar
Any and all help is appreciated!Thanks
What about a 3rd Option: SQL?
Creating XML Documents with SQL – All Publishing Functions are available since Release 7.1. Complex SQL Statements can be wapped with views in composition with global variables.
For consuming XML the XML_TABLE Table Function is also available since Release 7.1 (with TR). And again the SELECT statement can be wrapped as an SQL view, which can be used like any table.
... in this way the Source Code can be reduced to a minimum (independent which programming language is used) and if something changes only the appropriate view has to be modified.
Mit freundlichen Grüßen / Best regards
"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them and keeping them!"
„Train people well enough so they can leave, treat them well enough so they don't want to." (Richard Branson)
Generally, I've found that data transformation is best done in a language designed specifically for that, especially if your primary concern is speed of development.
Specifically, I'd recommend taking a look at Node.js for this use case as you could probably get the functionality you need done in ~3 lines of code (open a db connection, execute your sql, use an open source xml generator to generate the xml). The added benefit of those tools is that they are capable of much, much more than just generating xml, so if you end up also needing to convert data to other formats or run more complex data transformations, those would be pretty easy too.
In that case, the most complex part of a system like that would be making sure the Node system is secure, performant, and reliable. That's a less easy task, but I'd be happy to help you get that set up.
Send me an email if you have any questions: email@example.com
Good luck with your project!
Eradani Inc | API Enablement & Open Source Expertise for IBM i