public static void writeXmlNoSpace ( Document doc , String encoding , Writer out ) throws IOException { XMLSerializer ser = new XMLSerializer ( out , getXmlNoSpace ( encoding ) ) ; ser . serialize ( doc ) ; out . close ( ) ; }
Serialize the dom Document with no preserved space between elements but without indenting line wrapping omission of XML declaration or omission of doctype