title: com.w3c.dom.Document without <?xml version="1.0" encoding="UTF-8" standalone="no"?>
body: <p>I am creating a <code>com.w3c.dom.Document</code> from a <code>String</code> using this code:</p>
  
  <pre><code>DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
  DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
  Document doc = docBuilder.parse(new InputSource(new StringReader("&lt;a&gt;&lt;b id="5"/&gt;&lt;/a&gt;")));
  </code></pre>
  
  <p>When I <code>System.out.println(xmlToString(document))</code>, I get this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;&lt;a&gt;&lt;b id="5"/&gt;&lt;/a&gt;
  </code></pre>
  
  <p>Everything is ok, but I don't want the XML to have the <code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;</code> declaration, because I have to sign the  with private key and embed to soap envelope.</p>