'Used with a regular expression to substitute the
appropriate XML entity for an XML special character.'

def _sub_entity(self, x):

    return (('&' + self.XML_SPECIAL_CHARS_TO_ENTITIES[x.group(0)[0]]) + ';')
