#!/usr/bin/perl
use XML::DT;
use Data::Dumper;
%handler = (
             -default => sub{$c},
             people   => sub{ join("\n",@$c)},
             person   => sub{ print " 
$c->{name} 
$c->{address}[0]

Dear $c->{name}
Merry Christmas from Morris\n"; toxml();},
             -type    => { people => 'SEQ',
                           person => MMAPON('address')});

$people = dt("ex11.1.xml", %handler);

print Dumper($people);
print $people->[1]{address}[1];
