Closed eirtech closed 5 years ago
Hi, can you give us an example of the XML structure?
You can address the record nodes via XPath and flatten the nested data structure
$ catmandu convert XML --path '//record_node' to CSV --fix 'collapse()' < records.xml
or join the array elements:
$ catmandu convert XML --path '//record_node' to CSV --fix 'join_field(.,",")' < records.xml
Thanks @jorol. It worked well.
Hi, In conversion from XML to CSV, it is converted to a one field which is an ARRAY. Actually, as most of the XML file, it has a node which represents a single record. But it sees this as an ARRAY and just shows a CSV, contains one column with the node name including one record as an ARRAY. Would you please help me how to solve this issue? Thanks in advanced.