def parseXmlFile(xmlFile, handler):
 try:
  with contextlib.closing(StringIO(readCachedFileContent(xmlFile))) as stream:
   parse(stream, handler)
 except (SAXParseException, UnicodeError) as ex:
  errMsg = 'something seems to be wrong with '
  errMsg += ("the file '%s' ('%s'). Please make " % (xmlFile, ex))
  errMsg += "sure that you haven't made any changes to it"
  raise SqlmapInstallationException, errMsg

def parseXmlFile ( xmlFile , handler ) : try : with contextlib . closing ( StringIO ( readCachedFileContent ( xmlFile ) ) ) as stream : parse ( stream , handler ) except ( SAXParseException , UnicodeError ) as ex : errMsg = 'something seems to be wrong with ' errMsg += ( "the file '%s' ('%s'). Please make " % ( xmlFile , ex ) ) errMsg += "sure that you haven't made any changes to it" raise SqlmapInstallationException , errMsg
parses xml file by a given handler .