Fix the data2xml() XML generation