Reading in an XML file as text to edit [on hold]

I'm new to programming and think I might have done something that is not best practice. I have read in an xml file as a string (using Python) and chopped and changed some things, finally I write the string to a file with .xml extension. The file reads into the database I'm uploading it to with no problems, however when I try to open up the xml file in Notepad++ (for checking details) it is displayed as one long row.

I'm not sure if I have done something wrong or I should have changed a setting in Notepad++ because other xml files open with the tree structure I would expect.

Any help and resource recommendations for learning more on this would be much appreciated.

Thanks, J