mdx <j8shen@gmail.com> wrote in news:OPNdf.233$KP5.41061
@news20.bellglobal.com:
> Hi all
>
[quoted text clipped - 5 lines]
>
> Format XMLOutFormat = new Format();
First off, you don't want to use XMLOutFormat as variable name. Variable
names should not start with a capital letter, to avoid confusion. Class
names start with a capital.
> XMLOutFormat.setIndent(" ");
> XMLOutFormat.setLineSeparator("\n");
[quoted text clipped - 7 lines]
>
> Howard
Format does not have a public constructor, so you need one of the
"factory" methods getCompactFormat(), getPrettyFormat() or getRawFormat
().
For example:
Format format = Format.getRawFormat();
format.setIndent(" ");
format.setLineSeparator("\n");
XMLOutPutter xmlOut = new XMLOutPutter(format);
Note that the setIndent and setLineSeparator return a Format object as
well, so you can use the compact notation:
Format.getRawFormat().setIndent(" ").setLineSeparator("\n");
mdx - 13 Nov 2005 21:27 GMT
appreciate the help!..
Howard
> mdx <j8shen@gmail.com> wrote in news:OPNdf.233$KP5.41061
> @news20.bellglobal.com:
[quoted text clipped - 43 lines]
>
> Format.getRawFormat().setIndent(" ").setLineSeparator("\n");