[open-ils-commits] r12015 - trunk/Open-ILS/src/extras/import

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 29 15:05:33 EST 2009


Author: miker
Date: 2009-01-29 15:05:29 -0500 (Thu, 29 Jan 2009)
New Revision: 12015

Modified:
   trunk/Open-ILS/src/extras/import/marc_add_ids
Log:
good-ify the output xml

Modified: trunk/Open-ILS/src/extras/import/marc_add_ids
===================================================================
--- trunk/Open-ILS/src/extras/import/marc_add_ids	2009-01-29 20:02:17 UTC (rev 12014)
+++ trunk/Open-ILS/src/extras/import/marc_add_ids	2009-01-29 20:05:29 UTC (rev 12015)
@@ -38,6 +38,8 @@
 	$partcount++;
 }
 
+print '<collection xmlns="http://www.loc.gov/MARC21/slim">';
+
 my $count = 0;
 while (<>) {
 	chomp;
@@ -99,6 +101,7 @@
 
 		my $x = $r->as_xml_record;
         $x =~ s/\n//gso;
+        $x =~ s/^<[^>]>//o;
         print $x."\n";
         $count++;
         print STDERR "\r$count" unless ($quiet || $count % 100);
@@ -108,4 +111,5 @@
 	};
 }
 
+print '</collection>';
 



More information about the open-ils-commits mailing list