def METHOD_NAME(fname):
    tree = et.parse(fname)
    root = tree.getroot()
    if root.tag == 'spdx':
        root.tag = 'SPDX'
        logger.error('changing root element to SPDX (capital letters)')
    #ts = '{:%Y%m%d%H%M%S%z}'.format(datetime.datetime.now())
    root.set('xmlns', NAMESPACE_URL)
    blocks = pretty(root, 0)
    ser = fmt(blocks)
    with open(fname, 'wt', encoding='utf-8') as f:
        f.write(XML_PROLOG+"\n")
        f.write(ser)