'How to generate a csv file (containing the tables, measures etc.) from a xmla cube file?

I have an xmla file of a SSAS cube. This xmla file contains all the details like fact table, columns, datatypes, Measures, dimensions, relationships etc. I want to parse this xmla file to generate individual csv file where each sheet contains the corresponding table details like columns, datatypes etc. Preferably I want to use python / scala since the scripts would be running on databricks. E.g. xmla file looks like this I'm looking to generate a csv file which contains details as follows. Table name :: Column Name :: Datatype Name



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source