my ($ups_able_info) = ([]); &parseXml($xmlfile); sub parseXml{ my $twig1 = new XML::Twig( twig_handlers => { 'ups:TABLE_INFO/ups:fiel +d' => \&parse_table_info} ); } ### twig handler to parse columns. sub parse_table_info { my( $twig, $table_info)= @_; my $table_column = {}; $table_column->{$table_info->first_child_text('ups:tag')} = $ +table_info->first_child_text('ups:ui_name'); push(@{$ups_table_info}, $table_column); }
In reply to Passing parameters for XML::twig handler by shree
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |