Updated the code to generate XML for multiple XML files