I need to transform one XML (say x1.xml) which is the input to my application to a slightly different XML(say x2.xml) format which is based on the newer version of same schema. x2 is the output from my application. About 90% of elements of x1 and x2 are same as they belong to same schema (just different versions).
What will be the best approach for transformation. I am using java and mule esb.
This is a bread and butter task for XSLT. Start with an identity template rule that by default copies elements across unchanged:
and then add further template rules for any elements you want to modify.