Have you tried this: XMLWriter writer = new XMLWriter(outStream,OutputFormat.createPrettyPrint()); writer.write(DocumentHelper.parseText(doc));
-----Original Message----- From: Evan Kirkconnell [mailto:[EMAIL PROTECTED] Sent: Friday, June 23, 2006 2:51 PM To: dom4j-user@lists.sourceforge.net Subject: [dom4j-user] Document Formatting Is there a way to write a Document that doesn't look like poop? The best I've done is preserved whitespace, but this breaks when you modify the document, which kind of defeats the purpose. All I really want is for start and end tags to be on their own line if the element has child nodes, and the proper tabbing enforced based on the depth of the element. --Evan Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ dom4j-user mailing list dom4j-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-user