xml2csv is a small command-line tool written in JAVA and can be used on all platforms, for which JRE 8 or higher is available.
Examples:
1. Help
java -jar xml2csv-1.0.jar --help
2. Extract nodes from xml:
java -jar xml2csv-1.0.jar --nodes test/cd_catalog.xml
The result is the full node name and number of repetitions:
/CATALOG=1
/CATALOG/CD=26
/CATALOG/CD/TITLE=26
/CATALOG/CD/ARTIST=26
/CATALOG/CD/COUNTRY=26
/CATALOG/CD/COMPANY=26
/CATALOG/CD/PRICE=26
/CATALOG/CD/YEAR=26
3. ...
...It is packaged as an auto executable Jar for convenient command line execution but might as well be interfaced directly by a Java class as part of a broader [yet non commercial] software.
It handles attributes, repeated elements, and so on, and produces results which level up with what spreadsheets generate when they import native XML (at least in its most extensive execution mode).