+$| = 1;
+print "$0: dumping $n records\n";
+foreach my $i (1..$n) {
+ print ".";
+ print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0;
+ my $rec = $rs->record($i-1);
+ my $xml = $rec->render();
+ open F, ">$i.xml" or die "can't open\n";
+ print F $xml;
+ close F;
+}
+print " $n/$n (100%)\n" if $n % 50 != 0;