Parses the sole floating point value with name tag_name in tag t. Heavy-handed with the asserts.

def parse_singular_float(t, tag_name):
    '''Parses the sole floating point value with name tag_name in tag t. Heavy-handed with the asserts.'''
    pos = t.getElementsByTagName(tag_name)
    assert(len(pos) == 1)
    pos = pos[0]
    assert(len(pos.childNodes) == 1)
    return float(pos.childNodes[0].data)