count ContributionType
[star2016] / star2016-abstracts.pl
index bda55b1..2d872c3 100755 (executable)
@@ -7,5 +7,19 @@ use Data::Dump qw(dump);
 my $tpp = XML::TreePP->new();
 my $tree = $tpp->parsefile( "abstracts.xml" );
 
-print dump($tree);
+my $abstracts = delete $tree->{AbstractBook}->{abstract};
 
+warn "# tree = ", dump($tree);
+
+my $stat;
+
+foreach my $abstract ( @$abstracts ) {
+       warn "# abstract = ", dump($abstract);
+
+       foreach $k (qw( ContributionType )) {
+               $stat->{$k}->{ $abstract->{$k} } ++;
+       }
+
+}
+
+warn "# stat = ",dump($stat);