def generate_import_record(self, filename, bulkload_state):
    self.bulkload_state = bulkload_state
    tree = ElementTree.parse(filename)
    xpath_to_nodes = self.xpath_to_nodes
    if (len(xpath_to_nodes) > 1 and xpath_to_nodes[0] == '/'
        and xpath_to_nodes[1] != '/'):


      if not tree.getroot().tag == xpath_to_nodes.split('/')[1]:
        return
      xpath_to_nodes = '/' + xpath_to_nodes.split('/', 2)[2]
    nodes = tree.findall(xpath_to_nodes)

    for node in nodes:
      if self.xml_style == self.ELEMENT_CENTRIC:
        input_dict = {}
        for child in node.getchildren():

          if not child.tag in input_dict:
            input_dict[child.tag] = child.text
      else:

        input_dict = dict(node.items())
      input_dict['__node__'] = node
      yield input_dict
Entry point called by the operation framework.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/bulkload/simplexml_connector.py/SimpleXmlConnector.generate_import_record--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/op/save_photos_op.py/SavePhotosOperation.Execute