def _replAllXMLRef(match):
 ref = match.group(1)
 value = everyentcharrefsget(ref)
 if (value is None):
  if (ref[0] == '#'):
   return unichr(int(ref[1:]))
  else:
   return ref
 return value

def _replAllXMLRef ( match ) : ref = match . group ( 1 ) value = everyentcharrefsget ( ref ) if ( value is None ) : if ( ref [ 0 ] == '#' ) : return unichr ( int ( ref [ 1 : ] ) ) else : return ref return value
replace the matched xml reference .