I have the following xml data structure and I'm trying to create a transformation in Pentaho that gives the output shown in the linked image. The data has elements nested in elements and I can only seem to set the Loop XPath option to get either the main_components or the sub_components.
<?xml version="1.0" encoding="UTF-8"?>
<components>
<main_component>
<name>Engine</name>
<ref_no>336820-182</ref_no>
<oem>Ford</oem>
</main_component>
<main_component>
<name>Gearbox</name>
<ref_no>378912-009</ref_no>
<oem>GM</oem>
</main_component>
<main_component>
<name>Fuel Tank</name>
<ref_no>378927</ref_no>
<oem>GM</oem>
<sub_component>
<name>Fuel Pump</name>
<ref_no>27182A</ref_no>
<oem>Lucus</oem>
</sub_component>
<name>Contents Unit</name>
<ref_no>1219290</ref_no>
<oem>Honeywell</oem>
</sub_component>
</main_component>
</components>
