Merging XML code