my $struct = $section->simplify( forcearray => 1 ); #### sub uml_class { my ( $twig, $section ) = @_; print "data for class:\n"; print " name = ", $section->att( 'name' ), "\n"; print " xmi.id = ", $section->att( 'xmi.id' ), "\n"; my $subTwig = XML::Twig->new( twig_roots => { 'UML:Attribute' => \¨_attr } ); # $subTwig->parse( $xml ); # original code (typo) $subTwig->parse( $section->sprint() ); }