XML -> DOM Tree -> XML

"Ifj. Bistey Csaba" <[email protected]> Tue, 26 Aug 2003 09:04:29 +0200
Newsgroups gmane.text.xml.sax.general
Message-ID <[email protected]>
Hi all!

Sorry if this is the wrong list to send this message , but i stuck. So i 
write a Java application that parses an XML file creates a DOM tree do 
something on the tree and write to an other XML file. But my problem is 
that the output XML file does not look like the input XML file. What do 
i mean?

This is the input:

<?xml version="1.0"?>
<root>
        <a>
                1
        </a>
        <a>
                2
        </a>
        <a>

                3
        </a>
</root>

This is the output:

<?xml version="1.0" encoding="UTF-8"?>
<root>
    <a>                 1         </a>
    <a>                 2         </a>
    <a>                 3         </a>
</root>

This case i did not touch the tree just read and parse the original XML 
document, and create an output from it.
Is it possible to keep the format of the original XML document??? (i 
mean that with whitspaces,line breaks, etc.)
What causes it ? The parser or the serializer?
I think the serializer but not sure.

Thank you for your help.

Csaba Bistey



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
List: [email protected]
See:  http://www.saxproject.org
https://lists.sourceforge.net/lists/listinfo/sax-users