I need to convert below XML to CSV such that for null xml tag there must not be any comma in CSV file.
for example , consider below XML
<data>
<user>
<id>1</id>
<name>jaison</name>
<age>21</age>
</user>
<user>
<id>2</id>
<name>Monson</name>
<age></age>
</user>
</data>
expected csv:
id,name,age
1,jaison,21
2,Monson
One way would be to try to add a
[normalize-space()]predicate to all element selections e.g.