node.getparent().remove(node)
elif pos == 'attributes':
for child in spec.getiterator('attribute'):
- attribute = (child.get('name'), child.text and child.text.encode('utf8') or None)
+ attribute = (child.get('name'), child.text or None)
if attribute[1]:
node.set(attribute[0], attribute[1])
elif attribute[0] in node.attrib: