Updated main to support XML-to-XML merge