'Assign a namespace to an element and any children that
don\'t have a namespace.
Arguments:
xml -- The XML object to fix.
ns  -- The namespace to add to the XML object.'

def fix_namespaces(self, xml, ns):

    if xml.tag.startswith('{'):
        return
    xml.tag = ('{%s}%s' % (ns, xml.tag))
    for child in xml:
        self.fix_namespaces(child, ns)
