XML generation phase I