'Returns a dict that maps element names to unicode characters uniquely.
@param doc1: html/xml tree string as lxml Element or ElementTree
@param doc2: html/xml tree string as lxml Element or ElementTree
@param minIndex: start numbering with this unicode value'

def tagNameToCharMap(self, doc1, doc2, minIndex=0):

    tags = set((elem.tag for elem in doc1.xpath('//*')))
    tags.update((elem.tag for elem in doc2.xpath('//*')))
    unicodeAlphabet = (struct.pack('<H', index).decode('utf-16') for index in range(minIndex, (minIndex + len(tags))))
    numberedTags = zip(tags, unicodeAlphabet)
    return dict(numberedTags)
