python and parsing an xml file

Terry Reedy tjreedy at
Mon Feb 21 13:22:11 EST 2011

On 2/21/2011 12:30 PM, Matt Funk wrote:
> Hi,
> I was wondering if someone had some advice:
> I want to create a set of xml input files to my code that look as follows:


> So there are comments, whitespace etc ... in it.
> I would like to be able to put everything into some sort of structure
> such that i can access it as:
> structure['Algorithm']['Type'] == Alg1

Unless I have a very good reason otherwise, I would just put everything 
in nested dicts  in a .py file to begin with. Or if I needed cross 
language portability, a JSON file, which is close to the same thing.

Terry Jan Reedy

More information about the Python-list mailing list