title: java XMLUtils.outputDOM output is empty
body: <p>Cant figure out why XMLUtils.outputDOM is not outputing anything</p>
  
  <pre><code>import org.apache.xml.security.utils.XMLUtils;
  
  DocumentBuilderFactory dbf= DocumentBuilderFactory.newInstance();
  dbf.setNamespaceAware(true);
  InputSource is = new InputSource(new StringReader("&lt;EDoc&gt;&lt;/EDoc&gt;"));
  Document doc = dbf.newDocumentBuilder().parse(is);
  Element root = doc.getDocumentElement();
  System.out.println(root);
  OutputStream os = new FileOutputStream("out_xs.xml");
  XMLUtils.outputDOM(root, os, true);
  System.out.println(XMLUtils.getFullTextChildrenFromElement(root));
  </code></pre>
  
  <p>Output is:</p>
  
  <pre><code>[EDoc: null]
  (empty string)
  </code></pre>
  
  <p>out_xs.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>I can get the root element OK, but file is generated with xml definition only as <code>true</code> is provided. What is going on? I am using same function in other place where it works after library uses Document, so I suspect <code>Document</code> should be notified to commit changes? Cant find any information using search</p>