I Have a XML file like this
<Tester author="Name" id="16384543">
<insert tableName="sampletable">
<column name="id" valueNumeric="2"/>
<column name="name" value="kathy"/>
<column name="active" valueBoolean="true"/>
<column name="age" valueNumeric="2"/>
</insert>
<insert tableName="sampletable">
<column name="id" valueNumeric="23"/>
<column name="name" value="Queen"/>
<column name="active" valueBoolean="true"/>
<column name="age" valueNumeric="29"/>
</insert>
<insert tableName="sampletable">
<column name="id" valueNumeric="25"/>
<column name="name" value="varshan"/>
<column name="active" valueBoolean="false"/>
<column name="age" valueNumeric="5"/>
</insert>
</Tester>
I need to convert the XML into CSV like below:
id,name,active,age
2,kathy,TRUE,2
23,Queen,TRUE,29
25,varshan,FALSE,5
Requriement:
These column attributes will be dynamic and it will be different for different XMLs. Can someone help?