예제 #1
0
def fileobjects_using_dom(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)
    return dfxml.fileobjects_dom(xmlfile=xmlfile,imagefile=imagefile,flags=flags)
예제 #2
0
def fileobjects_using_dom(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)
    return dfxml.fileobjects_dom(xmlfile=xmlfile,
                                 imagefile=imagefile,
                                 flags=flags)