How can we convert XML file to CSV?

后端 未结 6 584
星月不相逢
星月不相逢 2021-01-29 09:05

I am having an XML file



    
        
        

        
6条回答
  •  温柔的废话
    2021-01-29 10:08

    In pseudo code:

    loop through the rows:
        loop through all children of `Row`:
            write out the text
            append a comma
        new line
    

    That quick little loop will write a comma at the end of each line, but I'm sure you can figure out how to remove that.

    For actually parsing the XML, I suggest using JDOM. It has a pretty intuitive API.

提交回复
热议问题