private static ITable createTable(Element[] rows, IDataSet metaDataSet)
private ITable createTable(Element[] rows, IDataSet metaDataSet)
    private static ITable createTable(Element[] rows, IDataSet metaDataSet)            throws DataSetException    {        Element sampleRow = rows[0];        ITableMetaData metaData = null;        if (metaDataSet != null)        {            String tableName = sampleRow.getName();            metaData = metaDataSet.getTableMetaData(tableName);        }        else        {            metaData = FlatXmlTable.createMetaData(sampleRow);        }        // Assume empty table when only one row with no columns        if (rows.length == 1 && sampleRow.getAttributes().size() == 0)        {            rows = new Element[0];        }        return new FlatXmlTable(rows, metaData);    }