Filter records in an XML file and write the output to three different CSV files.
About this task
This example uses the following XML sample as
input:
<orders>
<order>
<orderId>ih3fPC</orderId>
<lastName>Chester</lastName>
<firstName>Harding</firstName>
<region>US</region>
</order>
<order>
<orderId>vF7lNh</orderId>
<lastName>Bill</lastName>
<firstName>Madison</firstName>
<region>EMEA</region>
</order>
<order>
<orderId>l7xZ4P</orderId>
<lastName>George</lastName>
<firstName>Harding</firstName>
<region>APAC</region>
</order>
<order>
<orderId>dTTrNO</orderId>
<lastName>Abraham</lastName>
<firstName>Roosevelt</firstName>
<region>US</region>
</order>
<order>
<orderId>wZlWOj</orderId>
<lastName>William</lastName>
<firstName>Quincy</firstName>
<region>APAC</region>
</order>
</orders>
The goal of the transformation is to split this file based on the value of the
region
element.