title: Convert XML-File to string without manipulation or optimization in Java
body: <p>I have some trouble with the JDOM2 whitch i use to work with XML files.
  I want to convert the XML file to a string without any manipulation or optimization. </p>
  
  <p>Thats my Java code to do that:</p>
  
  <pre><code>SAXBuilder builder = new SAXBuilder();
      File xmlFile = f;
  
      try 
      {
          Document document = (Document) builder.build(xmlFile);
  
          xml = new XMLOutputter().outputString(document);
  
      } catch (Exception e) {
          System.out.println(e.getMessage());
      }
  
      return xml;
  </code></pre>
  
  <p>But when I compare my string with the original XML file I notice some changes.</p>
  
  <p>The original:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="windows-1252"?&gt;
  &lt;xmi:XMI xmi:version="2.1" xmlns:uml="http://schema.omg.org/spec/UML/2.0" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:thecustomprofile="http://www.sparxsystems.com/profiles/thecustomprofile/1.0" xmlns:SoaML="http://www.sparxsystems.com/profiles/SoaML/1.0"&gt;
  </code></pre>
  
  <p>And the string:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xmi:XMI xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:SoaML="http://www.sparxsystems.com/profiles/SoaML/1.0" xmlns:thecustomprofile="http://www.sparxsystems.com/profiles/thecustomprofile/1.0" xmlns:uml="http://schema.omg.org/spec/UML/2.0" xmi:version="2.1"&gt;
  </code></pre>
  
  <p>And all umlauts (ä, ö , ü) are changed too. I will get something like that: '�' instead of 'ä'.</p>
  
  <p>Is there any way to stop that behaviore?</p>