python ElementTree xml: parsing fromstring vs building elements

Luss_2001

New Member
Given a large array of numbers where:\[code\][1, 2, 3, 4 ...] => <tag attrib="1" /> <tag attrib="2" /> <tag attrib="3" /> <tag attrib="4" /> ...\[/code\]Which is more efficient/fast:a) building them from scratch using \[code\]Element("name", attributes)\[/code\] and appending them to some rootor b) \[code\]fromstring(str)\[/code\] where str is the string representation of those tags in the example
 
Back
Top