Pentaho

 View Only

 How to create a nested XML Output

  • Pentaho
  • Kettle
  • Pentaho
  • Pentaho Data Integration PDI
Mike Spiegel's profile image
Mike Spiegel posted 05-04-2019 16:09

How can I create a nested XML output that takes multiple sets of data and combines them into a single nested XML output?   I've tried multiple different steps with the XML joins, streams, merges, etc, and none of them provide me with the results I need. 

I'm looking to create something that looks like this:

<samplefile>

<headerinfo>

<numrec>5</numrec>

<sumAmt>100.00</sumAmt>

</headerinfo>

<consumer>

<name>mike></name>

<add1>123 Main St</add1>

</consumer>

<detail>

<car>Y</car>

<mortg>N</mortg>

<income>

<salary>1000.00</salary>

</income>

</detail>

</samplefile>

Attached is a short sample copy of a KTR file with two data sets that I'm trying to work with to get closer to my desired result.   Is this just not possible with this product?

Thanks,

Mike


#Kettle
#PentahoDataIntegrationPDI
#Pentaho
Johan Hammink's profile image
Johan Hammink

Did you have a look in the samples directory to the transformation "XML join - Create a multilayer XML file.ktr" ?

Data Conversion's profile image
Data Conversion
Attachment  View in library