def METHOD_NAME(pos_list_elem, swap_axes):
    # retrieve the number of elements per point
    dims = int(pos_list_elem.attrib.get('srsDimension', '2'))
    parts = [float(coord) for coord in pos_list_elem.text.strip().split()]
    ring = []
    i = 0
    while i < len(parts):
        ring.append(
            (parts[i + 1], parts[i]) if swap_axes else (parts[i], parts[i + 1])
        )
        i += dims
    return ring