The CoolSpools Database module contains functionality to simplify the process of importing from an XML file into IBM i (AS400, iSeries) database tables. This easy to use and intuitive process consists of three steps:

Generate the map

By using a sample of the XML file to be imported, the CoolSpools ‘Build XML-DBF Map’ (BLDXMLDBF) command generates the XML-to-database map structure.

Map the XML elements and/or attributes to the IBM i database fields

The ‘Work with XML-to-database maps’ (WRKXMLDBF) command is used to edit the map created in step 1 and specify which database field should be populated by each XML element/attribute.

Import XML into the IBM i database

By specifying the IFS path to the XML document and the XML-to-database map name the Import XML to Database (IMPXMLDBF) command parses the XML and populates the IBM i database.

 

All the XML-to-database commands can be found on the CoolSpools XMLDBF menu, also available via Option 23 on the CoolSpools DATABASE menu.

An example can be found here