XML generation 1st step