def METHOD_NAME(xmlfile):
    # open xml file for reading
    xml = ET.parse(xmlfile)
    titles = {'description': 'Description',
              'source': 'Source',
              'releasePolicy': 'Release Policy',
              'references': 'References',
              'tasks': 'MPAS-Analysis Tasks'}
    path = 'obs'
    try:
        os.makedirs(path)
    except OSError:
        pass
    all_obs = open('all_obs.rst', 'w')
    all_obs.write('.. toctree::\n')
    all_obs.write('   :maxdepth: 1\n\n')
    urlBase = 'https://web.lcrc.anl.gov/public/e3sm/diagnostics/observations'
    for entry in xml.findall('observation'):
        nameInDocs = entry.findall('nameInDocs')
        if len(nameInDocs) == 0:
            # we're not making a page for this one
            continue
        footer = ''
        nameInDocs = nameInDocs[0].text.strip()
        all_obs.write('   {}/{}.rst\n'.format(path, nameInDocs))
        name = entry.findall('name')[0].text.strip()
        rst = open('{}/{}.rst'.format(path, nameInDocs), 'w')
        rst.write('.. _{}:\n\n'.format(nameInDocs))
        rst.write('{}\n'.format(name))
        rst.write('=' * len(name))
        rst.write('\n\n')
        for tag in titles:
            title = titles[tag]
            rst.write('{}\n'.format(title))
            rst.write('{}\n'.format('-' * len(title)))
            text = entry.findall(tag)[0].text.strip()
            if tag == 'tasks':
                text = add_task_links(text)
            if tag == 'references':
                bibtexFound = False
                bibtex = entry.findall('bibtex')
                if len(bibtex) > 0:
                    # there is a bibtex tag
                    bibtex = bibtex[0].text.strip()
                    if len(bibtex) > 0:
                        # the bibtex tag is also not empty
                        bibtexFound = True
                if bibtexFound:
                    # add a link to the bibtex file
                    subdirectory = entry.findall('subdirectory')[0].text.strip()
                    text = '{}\n\n[bibtex file]({}/{}/obs.bib)'.format(
                        text, urlBase, subdirectory)
            text, footer = cleanup(text, footer)
            rst.write('{}\n\n'.format(text))
        rst.write(footer)
        rst.write('\n')
        rst.close()
    all_obs.close()