Parses XML file by a given handler
(xmlFile, handler)
| 2407 | kb.prependFlag = False |
| 2408 | |
| 2409 | def parseXmlFile(xmlFile, handler): |
| 2410 | """ |
| 2411 | Parses XML file by a given handler |
| 2412 | """ |
| 2413 | |
| 2414 | try: |
| 2415 | with contextlib.closing(io.StringIO(readCachedFileContent(xmlFile))) as stream: |
| 2416 | parse(stream, handler) |
| 2417 | except (SAXParseException, UnicodeError) as ex: |
| 2418 | errMsg = "something appears to be wrong with " |
| 2419 | errMsg += "the file '%s' ('%s'). Please make " % (xmlFile, getSafeExString(ex)) |
| 2420 | errMsg += "sure that you haven't made any changes to it" |
| 2421 | raise SqlmapInstallationException(errMsg) |
| 2422 | |
| 2423 | def getSQLSnippet(dbms, sfile, **variables): |
| 2424 | """ |
no test coverage detected
searching dependent graphs…