Gregory S. Hill
ghill at vmtllc.com
Fri Oct 29 13:02:31 PDT 2004
Hah. I think I know this one!
Format form = Format.getPrettyFormat();
XMLOutputter xmlOut = new XMLOutputter(form);
xmlOut.output(doc, new PrintWriter(new FileOutputStream("myfile.xml")));
This will output the xml in a nice, indented, 'newlined' format. Take a
look at the various Format.getXXXFormat() methods, as they provide a
variety of outputs.
pamarti srikiran wrote:
> Hi I recently downloaded jdom 1.0 and tried to use it. I m unable to get
> the newline to be printed in the output xml file.
> Im getting the following output
> instead of
> can anybody tell me how to do this. i have examples that use oldversion
> of jdom. help is greatly appreciated
> To control your jdom-interest membership:
More information about the jdom-interest