Tweak UDB-setting code to put it in the right part of the records.
Now ready to deploy.
print " $i/$n (", int($i*100/$n), "%)\n" if $i % 50 == 0;
my $rec = $rs->record($i-1);
my $xml = $rec->render();
- if ($xml !~ /<\/(e:)?host>/) {
+ if ($xml !~ /<(e:)?databaseInfo.*?>/) {
# There is an undeletable phantom record: ignore it
next;
}
if ($setUdb) {
my $udb = qq[<i:udb xmlns:i="http://indexdata.com/irspy/1.0">irspy-$i</i:udb>];
- $xml =~ s/<\/(e:)?host>/$1$udb/;
+ $xml =~ s/<(e:)?databaseInfo.*?>/$&$udb/;
}
update($conn, $xml);