Solution Timeline

All versions (edits) of solutions to Python 3 script to convert XML file rows into csv and HTML files appear below in the order they were created. Comments that appear under revisions were those created when that particular revision was current.

To see the revision history of a single solution (with diffs), click on the solution number (ie. "#1") in the upper right corner of a solution revision below.

← Bounty Expand all edits

Checkout my solution here: https://gist.github.com/minhtc/13a3ba2ddfcd9d5fa8553358e09477e2

Usage command:
python3 convert-xml.py export.xml

Winning solution

Hey need_solution, here's my solution: https://pastebin.com/raw/zBbT04s6

Copy and paste the code in a new file called py-export-rows.py and run it with python py-export-rows.py (assuming that python links to a python 3.x binary). It will read export.xml and produce .csv, .html and .pdf versions of the required columns.

Dependencies: pandas, weasyprint.

Install pandas with pip install pandas.

Install weasyprint by following your platform specific instructions here: https://weasyprint.readthedocs.io/en/stable/install.html

Hey need_solution, here's my solution: https://pastebin.com/car90Szh

Copy and paste the code in a new file called py-export-rows.py and run it with python py-export-rows.py (assuming that python links to a python 3.x binary). It will read export.xml and produce .csv, .html and .pdf versions of the required columns.

Dependencies: pandas, weasyprint.

Install pandas with pip install pandas.

Install weasyprint by following your platform specific instructions here: https://weasyprint.readthedocs.io/en/stable/install.html

Edit: Updated styling to match the one requested. Example PDF: https://www.dropbox.com/s/xczsmpp5y45rksv/export-IBMAppleMS-1908.pdf?dl=0

Tipped