'Return a serialized element with the given `tag`, attributes
`attrib`, and already-serialized `content`.'

def serialize(self, tag, attrib, content):

    if content:
        elem = etree.tostring(etree.Element(tag, attrib), method='xml')
        assert elem.endswith('/>')
        return ('%s>%s</%s>' % (elem[:(-2)], content, tag))
    else:
        return etree.tostring(etree.Element(tag, attrib), method=self.method)
