def fiwalk_using_sax(imagefile=None,xmlfile=None,fiwalk="fiwalk",flags=0,callback=None): """Processes an image using expat, calling a callback for every file object encountered. If xmlfile is provided, use that as the xmlfile, otherwise runs fiwalk.""" import dfxml if xmlfile==None: xmlfile = fiwalk_xml_stream(imagefile=imagefile,flags=flags,fiwalk=fiwalk) r = dfxml.fileobject_reader(flags=flags) r.imagefile = imagefile r.process_xml_stream(xmlfile,callback)
def fiwalk_using_sax(imagefile=None, xmlfile=None, fiwalk="fiwalk", flags=0, callback=None): """Processes an image using expat, calling a callback for every file object encountered. If xmlfile is provided, use that as the xmlfile, otherwise runs fiwalk.""" import dfxml if xmlfile == None: xmlfile = fiwalk_xml_stream(imagefile=imagefile, flags=flags, fiwalk=fiwalk) r = dfxml.fileobject_reader(flags=flags) r.imagefile = imagefile r.process_xml_stream(xmlfile, callback)