title: Convert Document (XML) directly to String in java without using transform or XMLSerializer
body: <p>Is there another way to convert XML <code>Document</code> object to <code>String</code> just like using transform or <code>XmlSerializer</code> from Apache API? I don't want to use mentioned conversion methods because it renders my output xml modifying tags representation ( like collapsing the empty tags to singleton tags). I want conversion method that output in <code>String</code> from the <code>Document</code> object (kind of treating content of <code>Document</code> object as text).</p>