@auraz lxml is a pain about namespaces, isn't it?  Can your XML really sometimes have a namespace and sometimes not?  Let's find a way to simplify this code.