title: Why isn't XStream generating xml header
body: <p>I'm using XStream to generate xml files of my objects. However, the version and encoding header is being omitted from the xml file, and I'm not sure why. Here is my method that prints out the xml file:</p>
  
  <pre><code>public static void personsToXML(ArrayList&lt;Person&gt; persons) throws FileNotFoundException {
          PrintWriter pw = new PrintWriter(new File("someFilePath"));
          XStream xstream = new XStream();
          for (Person i : persons)
              pw.print(xstream.toXML(i));
          pw.close();
      }
  </code></pre>
  
  <p>It outputs the xml just fine, but there is no header present, as in </p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  </code></pre>
  
  <p>is not present.</p>
  
  <p>Thanks!</p>