O'Reilly logo

Pentaho Data Integration Cookbook Second Edition by María Carina Roldán, Adrián Sergio Pulvirenti, Alex Meadows

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reading simple XML files

PEDI has a step named Get XML Data used to read XML structures. This recipe shows how to read an XML file containing information about museums using this step.

Getting ready

In this exercise, you will use a file named museum.xml with the following structure:

<museums>
   <museum id_museum= '…'>
      <name>…</name> 
      <city>…</city>
      <country>…</country> 
   </museum>
</museums>

We will be making use of Path, which is used to query XML documents to retrieve and compute information. If you are new to Path, it is recommended to check out the excellent tutorials over at http://www.w3schools.com/xpath/ to get a better understanding of Path before digging into the recipe.

How to do it...

Perform the following steps:

  1. Create a new transformation.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required