lundi 18 juillet 2016

How to add tons of attributes in an Element with Python and Elementtree?


Is it OK to use the following ?

ET.Element.attrib={'a': '1', 'b': '2', 'c': '3'}

Or do I have to make a for loop using ET.Element.set('x','y') ?


Aucun commentaire:

Enregistrer un commentaire