use new single xml file
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 22 Apr 2016 12:50:42 +0000 (14:50 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 22 Apr 2016 12:50:42 +0000 (14:50 +0200)
star2016-contributions.pl

index 0261df1..9ba6396 100755 (executable)
@@ -30,19 +30,27 @@ $doc->createStyle(
 
 
 my $nr = 0;
-foreach my $file ( glob 'contributions/*.xml' ) {
+#foreach my $file ( glob 'contributions/*.xml' ) {
+
+my $xml;
+open(my $fh, '<', 'contributions/all.xml');
+{
+       local $/ = undef;
+       $xml = <$fh>;
+       close($fh);
+}
+
+foreach my $xml ( split(/\Q<?xml\E/, $xml) ) {
+
+       next unless $xml;
+
+       $xml = '<?xml' . $xml;
 
        my $abstract;
 
-       warn "# reading $file\n";
+print $xml;
 
-       {
-               open(my $fh, '<:raw', $file);
-               local $/ = undef;
-               my $xml = <$fh>;
-#              warn dump($xml);
-               $abstract = $xs->XMLin( $xml, ForceArray => qw(PrimaryAuthor) );
-       }
+       $abstract = $xs->XMLin( $xml, ForceArray => qw(PrimaryAuthor) );
 
        warn "# abstract = ", dump($abstract);