Changed from writing file to just printing xml
Adding code to print in json format
Using .format for print statement