I\'m trying to convert a xml file to a csv file. I have an input xml file like this:
START
|
Take a look at xslt stylesheets and the xsltproc
command. If it is just converting unconditionally all data to rows with comma separated values from the cell tags it's a relatively simple stylesheet.
A quick search yielded this: XML to CSV Using XSLT With a few adaptations to your xml it should do what you need.
Parsing XML with Bash has been addressed here before:
How to parse XML in Bash?
That said it seems like a painful way to live.