#!/bin/perl -w
#########################################################################
# #
# This example prints a table using various pretty print options #
# #
#########################################################################
use strict;
use XML::Twig;
my $string=
'
value1value2value1(2)value2(2)value1(3)value2(3)
';
my $t= new XML::Twig;
$t->parse( $string);
print "normal:\n";
$t->set_pretty_print( 'none'); # this is the default
$t->print;
print "\n\n";
print "record:\n";
$t->set_pretty_print( 'record'); # one field per line
$t->print;
print "\n\n";
print "record_c:\n";
$t->set_pretty_print( 'record_c'); # one record per line
$t->print;
print "\n\n";
print "record:\n";
$t->print( PrettyPrint => 'record'); # alterate way to set the style
print "\n\n";