title: Carriage return and line feed XML - Java
body: <p>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. </p>
  
  <p>I have tried what was suggested here: <a href="https://stackoverflow.com/questions/139076/how-to-pretty-print-xml-from-java">How to pretty print XML from Java?</a>. 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.</p>
  
  <p>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?</p>