'Register with ElementTree a set of namespaces
:param nspair: A dictionary of prefixes and uris to use when
constructing the text representation.
:return:'

def register_prefix(self, nspair):

    for (prefix, uri) in nspair.items():
        try:
            ElementTree.register_namespace(prefix, uri)
        except AttributeError:
            ElementTree._namespace_map[uri] = prefix
        except ValueError:
            pass
