Generation of datatrees