def _gather_results(tree):
    """Convert the XML tree into a map of pod types to tuples (title, value).
    """

    result = {}
    for pod in tree.findall('.//pod'):
        pod_type = pod.attrib['id']
        title = pod.attrib['title']

        val = None
        for plaintext in pod.findall('.//plaintext'):
            if plaintext.text:
                val = plaintext.text.replace(u"\n", u", ")

        if val:
            result[pod_type] = (title, val)

    return result