merged xml and serialize into same switch case