def unescape_xml(xml_str): return sax_unescape(xml_str, ADDL_XML_UNESC_CHARS)
def unescape(s): deref_ncr = lambda m: unichr(int(m.group(1), 16)) # '/' -> '/' s = re.sub("&#[Xx]([A-Fa-f0-9]+);", deref_ncr, s) entities = {""": '"', "'": "'"} return sax_unescape(s, entities)
def unescape(s): deref_ncr = lambda m: unichr(int(m.group(1), 16)) # '/' -> '/' s = re.sub('&#[Xx]([A-Fa-f0-9]+);', deref_ncr, s) entities = {'"': '"', ''': "'"} return sax_unescape(s, entities)