Michael Liou
Statistics PhD Student at UW-Madison

Generate XML Outline in Python

February
15th,
2017

When parsing through xml files, it’s often helpful to have a general outline of the elements. Unfortunately, most python packages for parsing xml do not have a built-in function to view the general structure without viewing the raw xml file. Here is an example of a short recursive function in python to create such an outline.