I am trying to add a carriage return character and line feed character to format XML so that each element appears on its own line in MS Notepad.
I have tried what was suggested here: How to pretty print XML from Java?. Which adds a line feed character after each closing element. For more sophisticated editors like richText and gedit etc. the line feed character is enough. However, in notepad I seem to require a carriage return also in order to get each element on it's own line.
Is there a way to introduce that by altering a Document Transformer properties? If not is there a way to do this without have to parse the whole XML document and add them in manually?