I have (unfortunately) received some data in XML format. I need to use it in Python, preferably as a list of dictionaries. The data is a flat representation of a table, in the style:
<tablename> <fieldname1>Some Data</fieldname1> <fieldname2>Some Data</fieldname> ... </tablename> <tablename> <fieldname1>Some Data</fieldname1> <fieldname2>Some Data</fieldname> ... and so on (where tablename is always the same in one file). It looks like Beautiful Soup would be a good option to quickly change it into a usable format, but I need to extract the field name (there's lots and lots of fields) as well as the data, and I can't work out how to do that in Beautiful Soup. If anyone can give me some help I'd be grateful, or if they can point me in the direction of a better solution. Thanks Ed _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor