Modified to accept multiple xml files as input