builder.resource()
builder.attrib['href'] = 'Unit 4.html'
builder.attrib['{http://a.namespace.url/blah/v.10}scormtype'] = 'sco'
print(etree.tostring(builder, pretty_print=True))
How to add a namespace to an attribute in lxml