Python: Convert XML to CSV file
问题 I have an XML file like this: <hierachy> <att> <Order>1</Order> <attval>Data</attval> <children> <att> <Order>1</Order> <attval>Studyval</attval> </att> <att> <Order>2</Order> <attval>Site</attval> </att> </children> </att> <att> <Order>2</Order> <attval>Info</attval> <children> <att> <Order>1</Order> <attval>age</attval> </att> <att> <Order>2</Order> <attval>gender</attval> </att> </children> </att> </hierachy> I'm trying to convert it to a CSV file like this: Data,Studyval Date,Site Info