'Process lines for open tags that have attributes.
The important info is between [17:-1]. Take this info and split it
with the delimeter \'<\'. The first token in this group is the element
name. The rest are attributes, separated fromt their values by \'>\'. So
read each token one at a time, and split them by \'>\'.'

def __open_att_func(self, line):

    info = line[17:(-1)]
    tokens = info.split('<')
    element_name = tokens[0]
    tokens = tokens[1:]
    self.__write_obj.write(('<%s' % element_name))
    for token in tokens:
        groups = token.split('>')
        try:
            val = groups[0]
            att = groups[1]
            att = att.replace('"', '&quot;')
            att = att.replace("'", '&quot;')
            self.__write_obj.write(('    %s="%s"' % (val, att)))
        except:
            if (self.__run_level > 3):
                msg = 'index    out    of    range\n'
                raise self.__bug_handler, msg
    self.__write_obj.write('>')
    self.__new_line = 0
    if (element_name in self.__block):
        self.__write_new_line()
    if (element_name in self.__two_new_line):
        self.__write_extra_new_line()
