improve marc_cleanup's parsing of MARCXML files
authorGalen Charlton <gmc@esilibrary.com>
Mon, 30 Jul 2012 17:32:35 +0000 (13:32 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 30 Jul 2012 17:32:35 +0000 (13:32 -0400)
In particular, ones produced by use of MARC::File::XML->as_xml_record(),
which inserts namespace attributes in the record element.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>

marc_cleanup

index 2c3a005..4d7354e 100755 (executable)
@@ -316,7 +316,7 @@ sub buildrecord {
     my $istrash = 0;
     my $trash = $c->{trash};
 
-    $l = <MARC> while (defined $l and $l !~ /<record>/);
+    $l = <MARC> while (defined $l and $l !~ /<record/);
     return $l unless defined $l;
     $c->{ricount}++;