
Jan. 27, 2015
4:38 p.m.
I want to move all attributes of an element to another element. If the attributes of elements x are x.attrib and attributes = x.attrib, is there a single command that says "take the attribute dictionary of x and attach it to y"?
you still copy the attribute values, but all at once:
y.attrib.update(x.items()) x.attrib.clear()
jens