'Parse XML element of type HtmlType
@return ret A string containing the parsed element'

def parse_html_type(self, node):

    ret = ''
    tag = node.tag.lower()
    if (tag == 'containerblockelement'):
        if (len(list(node)) > 0):
            for child in list(node):
                ret += self.parse_html_type(child)
        else:
            ret += (node.text.encode('ascii', errors='backslashreplace').strip() if node.text else '')
    if (tag == 'listitem'):
        if (len(list(node)) > 0):
            for child in list(node):
                ret += self.parse_html_type(child)
        else:
            ret = (node.text.encode('ascii', errors='backslashreplace').strip() if node.text else '')
    if (tag == 'orderedlist'):
        i = 1
        for item in list(node):
            ret += ((((' DCTB ' + str(i)) + '    ') + self.parse_html_type(item)) + '\n')
            i += 1
    if (tag == 'paragraph'):
        if (len(list(node)) > 0):
            for child in list(node):
                ret += self.parse_html_type(child)
        else:
            ret += (node.text.encode('ascii', errors='backslashreplace') if node.text else '')
    if (tag == 'unorderedlist'):
        for item in list(node):
            ret += (((' DCTB ' + '*    ') + self.parse_html_type(item)) + '\n')
    if (tag == 'urllink'):
        if node.get('text'):
            ret += (node.text.encode('ascii', errors='backslashreplace').strip() + '    ')
        last = ''
        for attr in node.attrib:
            if (node.get(attr) and (node.get(attr) != node.get(last))):
                ret += (node.get(attr).encode('ascii', errors='backslashreplace') + '    ')
            last = attr
    return ret
