Convert xml file to csv in shell script?

前端 未结 2 1128
梦谈多话
梦谈多话 2021-01-03 15:29

I\'m trying to convert a xml file to a csv file. I have an input xml file like this:


  
    START         


        
2条回答
  •  庸人自扰
    2021-01-03 15:58

    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.

提交回复
热议问题