Reading an XML file with the Get data from XML step

To demonstrate how to parse an XML structure with PDI, we will need some sample XML files.

From this book's website, download the resources folder belonging to this chapter. Inside this folder, you will see a file named countries.xml. Save it in a folder relative to your working directory. For example, if your transformations are in the pdi_labsfolder, the file could be saved in pdi_labs/resources/.

This is how you read XML files:

  1. Create a new Transformation, give it a name, and save it.
  2. From the Input steps, drag to the canvas a Get data from XML step.
  3. Open the configuration window for this step by double-clicking on it.

In order to specify the name and location of an XML file, you have ...

Get Learning Pentaho Data Integration 8 CE - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.