|Using the <eXpat/> XML Parser on IBM i:
I'm working on putting together information on how to use the open source eXpat XML parser on the IBM i, I'm using this parser from the HTTPAPI project to parse XML responses.
Since I've done the work of making it compile and run on the IBM i, it seems only natural to provide it for other people to use in their projects.
For documenation on how to use Expat from your ILE C programs, please take a look at the Expat home page. In particular, there's a link to an introductory article by Clark Cooper that's a little dated, but very helpful in getting started.
For documentation on how to use Expat from your ILE RPG programs, please read the following articles that I've written for the System iNetwork:
Using Expat from an RPG Program, Part 1
Using Expat from an RPG Program, Part 2
Using Expat from an RPG Program, Part 3
Using Expat from an
RPG Program, Part 4
The preceding articles are based on the older (UTF-8 build) of Expat for IBM i. The following article describes the newer (UTF-16 build):
New Version of Expat with UTF-16 Support
My IBM i port of Expat contains all of the source code, plus a pre-compiled service program called "EXPAT." This way, you can use Expat on your system, even if you do not have the ILE C compiler installed.
Starting with version 2.0.0, I have Expat compiled with the XML_UNICODE symbol defined. This tells Expat to output UTF-16 when calling your procedures. This is a good thing for RPG programmers because RPG supports UTF-16 natively. (You code it as UCS2, then tell it to use CCSID(1200) which is UTF-16.)
Download Version 2.1.0 (Requires V5R4): Version 2.1.0 (SAVF format)
Download Version 2.1.0 (Requires V5R1): Version 2.1.0 (Zipped Source code -- source only)