AnsweredAssumed Answered

Create one row of data on flat file from an unbounded xml element

Question asked by KeithWeaver6631 on Sep 12, 2017
Latest reply on Sep 14, 2017 by KeithWeaver6631

I have an unbounded xml element from Workday that can have many instances of an element <Payroll_Result_Detail_Data>. Example:

 

<Employee>

   <Payroll_Result_Detail_Data>

      <element1></element1>

      <element2></element2>

      <element3></element3>

   </Payroll_Result_Detail_Data>

</Employee>

 

I need to map this to a csv file one row fore each employee where each payroll_result_detail_data element can be mapped to a unique column that looks like this

employee, Payroll Result Detail Data (instance1) element1,Payroll Result Detail Data (instance1) element2, Payroll Result Detail Data (instance1) element3, Payroll Result Detail Data (instance2) element1,Payroll Result Detail Data (instance2) element2,Payroll Result Detail Data (instance2) element3,Payroll Result Detail Data (instance3) element1,Payroll Result Detail Data (instance3) element2,Payroll Result Detail Data (instance3) element3

 

The only thing I can think of is to create identifier instance for each but there could be up to 25 instances and each one would need to go through some validation steps prior to mapping.  Hoping there is a better way.

Outcomes