Set the content of an xml element marked with the matching eid attribute.

def set_value(self, eid, val, idx='*'):
        """
        Set the content of an xml element marked with the matching eid attribute.
        """
        if eid in self.__element_ids:
            elems = self.__element_ids[eid]
            if type(val) in SEQ_TYPES:
                idx = 0
            if idx == '*':
                for elem in elems:
                    self.__set_value(eid, elem, val, idx)
            elif idx < len(elems):
                self.__set_value(eid, elems[idx], val, idx)