Helper for ``build_index()``: Yield a list of ElementTree.Element
  objects, each holding the xml for a single package collection.

def _find_collections(root):
  """
  Helper for ``build_index()``: Yield a list of ElementTree.Element
  objects, each holding the xml for a single package collection.
  """
  packages = []
  for dirname, subdirs, files in os.walk(root):
    for filename in files:
      if filename.endswith('.xml'):
        xmlfile = os.path.join(dirname, filename)
        yield ElementTree.parse(xmlfile).getroot()