I have two xml files, with the same structure, and I'd like to generate a new xml file with the same structure based on their contents. For example:
File1.xml
<?xml version="1.0" encoding="UTF-8"?>
<coverage>
<project timestamp="1369233123077" name="Project1">
<metrics conditionals="664" methods="117" classes="13" files="9" coveredstatements="1554" />
</project>
</coverage>
File2.xml
<?xml version="1.0" encoding="UTF-8"?>
<coverage>
<project timestamp="1369224383368" name="Project1">
<metrics conditionals="684" methods="122" classes="13" files="9" coveredstatements="1654" />
</project>
</coverage>
The resulted file I hope to get, and it contains substractions of the identical attributes. File3.xml
<?xml version="1.0" encoding="UTF-8"?>
<coverage>
<project timestamp1="1369233123077" timestamp2="1369224383368" name="Project1">
<metrics conditionals="20" methods="5" classes="0" files="0" coveredstatements="100" />
</project>
</coverage>
I tried XSL with File1.xml and managed to display the result as above, but I hoped to get a new XML file created on the hard drive. Is there a way to do it?