I build a DOM with the following xml : <root><child1>text</child1><child2>text</child2></root> After serializing using the xalan serializer with the pretty-print option I get: <?xml version="1.0" encoding="UTF-16"?><root> <child1>text</child1> <child2>text</child2> </root>
So the opening of the root is also in the first line. Second when I put in carriage returns or spaces, this effects the formatting seriously. For instance when I build a DOM with: <root>\n\n\n<child1>text</child1> <child2>text</child2></root> After serializing I get: <?xml version="1.0" encoding="UTF-16"?><root> <child1>text</child1> <child2>text</child2> </root> In all the cases the xerces serializer returns: <?xml version="1.0" encoding="UTF-16"?> <root> <child1>text</child1> <child2>text</child2> </root> Can you tell me if this behaviour i right? http://www.nabble.com/file/6633/TestSerializer.java TestSerializer.java -- View this message in context: http://www.nabble.com/Fomatting-question-serializing-DOM-with-pretty-print-tf3252607.html#a9041632 Sent from the Xalan - J - Users mailing list archive at Nabble.com.