From: Rogan Hamby Date: Wed, 3 Jun 2020 15:10:41 +0000 (-0400) Subject: fixed xpath issues with restore_itemtypes X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=754780bef498dff9cc511aef0a188b88d0b0fde1 fixed xpath issues with restore_itemtypes --- diff --git a/kmig.d/bin/mig-import b/kmig.d/bin/mig-import index ccc30d6..4483c23 100755 --- a/kmig.d/bin/mig-import +++ b/kmig.d/bin/mig-import @@ -455,7 +455,7 @@ sub restore_itemtypes { $sth = $dbh->prepare($query); $sth->execute(); - foreach my $node ($dom->findnodes('/authorised_values/value')) { + foreach my $node ($dom->findnodes('/document/authorised_values/value')) { my $category = sql_str($node->findvalue('./category')); my $authvalue = sql_str($node->findvalue('./authvalue')); my $lib = sql_str($node->findvalue('./lib')); @@ -466,7 +466,7 @@ sub restore_itemtypes { $sth->execute(); } - foreach my $node ($dom->findnodes('/itemtypes/value')) { + foreach my $node ($dom->findnodes('/document/itemtypes/value')) { my $itemtype = sql_str($node->findvalue('./itemtype')); my $description = sql_str($node->findvalue('./description')); my $rentalcharge = sql_str($node->findvalue('./rentalcharge'));