in reply to newline behaviour with XML::Writer
Try creating the object with:
my $writer = new XML::Writer(OUTPUT => $output, DATA_MODE => 1, DATA_INDENT=>2);As per XML::Writer POD the behavior of NEWLINES is exactly what you get, but DATA_MODE should do what you want:
DATA_MODE A true or false value; if this parameter is present and its value is true, then the module will enter a special data mode, inserting newlines automatically around elements and (unless UNSAFE is also specified) reporting an error if any element has both characters and elements as content.
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: newline behaviour with XML::Writer
by antiplex (Initiate) on Sep 15, 2008 at 15:41 UTC | |
by psini (Deacon) on Sep 15, 2008 at 18:55 UTC |