'Iterate over the spine and convert it to MOBIML'

def mobimlize_spine(self):

    for item in self.oeb.spine:
        stylizer = Stylizer(item.data, item.href, self.oeb, self.opts, self.profile)
        body = item.data.find(XHTML('body'))
        nroot = etree.Element(XHTML('html'), nsmap=MOBI_NSMAP)
        nbody = etree.SubElement(nroot, XHTML('body'))
        self.current_spine_item = item
        self.mobimlize_elem(body, stylizer, BlockState(nbody), [FormatState()])
        item.data = nroot
