The next time you post code, please use code tags. I've added them for you this time.
As for your issue, you haven't explained how the differences should affect anything. What result do you expect? What have you tried so far to achieve the result?
i need a new file1.xml with changes in node values as shown in file2.xml. i tried XMLUNIT based checking of xml files, but it shows only the difference between xml files,it does not provide methods to write changes
during running of the java code, i need to check two files in the order of node by node, and if any value changes found in file1, just write that change to file1
This is actually not a very trivial problem. What if you have a list of elements?
Are you going to merge things with the same id? Are you going to add new things? A lot of these issues can not be solved easily without having a good clear specification of the problem.