Handled new lines in output xml

as per late request from instructor