'Given a row of text, build table cells.'

def _build_row(self, row, parent, align):

    tr = etree.SubElement(parent, u'tr')
    tag = u'td'
    if (parent.tag == u'thead'):
        tag = u'th'
    cells = self._split_row(row)
    for (i, a) in enumerate(align):
        c = etree.SubElement(tr, tag)
        try:
            c.text = cells[i].strip()
        except IndexError:
            c.text = u''
        if a:
            c.set(u'align', a)
