[CDE-262] - Fixed cdv and xml export and added the functionality to download json and xml files if an attachment name is provided. Check style applied