def new_table(spj, element):

    # Create field infos
    formats = []
    info_dict = {}
    for eColumn in element.findall("Column"):
        # name
        try:
            name = eColumn.attrib["name"]
        except KeyError:
            logger.warn("Could not get column name; using default name instead.")
            name = utils.unique_names(["col"], info_dict.keys())

        # format
        try:
            format = eColumn.attrib["format"]
        except KeyError:
            logger.warn("Could not get column type, using default type instead.")
            format = "f4"
        formats.append(format)

        # create info with attributes
        info = Table.Info()
        for eAttribute in eColumn.findall("Attribute"):
            key = eAttribute.attrib["key"]
            value = eAttribute.text
            if value is not None:
                info.set_value(key, value)
        info_dict[name] = info

    # create table with given format and infos, but w/o any rows
    a = numpy.zeros((0,), {"names": info_dict.keys(), "formats": formats})
    tbl = Table(a, info_dict)

    # node info
    for eItem in element.findall("NodeInfo/Item"):
        key = eItem.attrib["key"]
        value = eItem.text
        if value is not None:
            tbl.node_info.set_value(key, value)

    for eItem in element.findall("NodeInfo/MetaItem"):
        key = eItem.attrib["key"]
        value = eItem.text
        if value is not None:
            tbl.node_info.metadata[key] = value

    # table key is essential
    try:
        key = element.attrib["key"]
    except KeyError:
        logger.warn("Could not get table key. Using generic key instead.")
        key = pdict.unique_key(spj.datasets, "dataset")
    tbl.key = key

    # Right now, the Table is still empty. By setting this callback
    # for the _import attribute, the dataset is loaded from the hard
    # disk on the next access.
    tbl._import = DatasetImporter(spj.get_filename(), tbl.key)
    return tbl