I have the below XML structure as input
<dataexport>
<header>
<companyinfo>
<companyid> 100 </companyid>
<companyname>ABC Corp</companyname>
</companyinfo>
</header>
<deptinfo>
<electrical>
<response>
<deptid> 1 </deptid>
<totalemp> 200 </totalemp>
<totalunits> 20 </totalunits>
</response>
</electrical>
<mechanical>
<response>
<deptid> 2 </deptid>
<totalemp> 150 </totalemp>
<totalunits> 40 </totalunits>
</response>
</mechanical>
<chemical>
<response>
<deptid> 3 </deptid>
<totalemp> 100 </totalemp>
<totalunits> 20 </totalunits>
</response>
</chemical>
The output that i am expecting is
| Company ID | Company name | Dept | Dept ID | Total emp |
|---|---|---|---|---|
| 100 | ABC Corp | Electrical | 1 | 200 |
| 100 | ABC Corp | Mechanical | 2 | 150 |
| 100 | ABC Corp | Chemical | 3 | 100 |
The design approach I went with was as below -
tXMLMap component has been configured like below -
With this approach, I was able to get only one output and am unable to combine results of deptinfo_electrical, deptinfo_mechanical and deptinfo_chemical into one dataflow to load to a snowflake table.
Please advise what design approach can be used here.

