From: Jason Etheridge Date: Tue, 19 Aug 2008 05:56:16 +0000 (+0000) Subject: findnodes only looks at immediate children X-Git-Url: http://git.equinoxoli.org/?p=migration-tools.git;a=commitdiff_plain;h=a51adaefa8666dc462d255280d8beca0506bf0c2 findnodes only looks at immediate children --- diff --git a/unicorn_patron_xml2text.pl b/unicorn_patron_xml2text.pl index be22309..fcaaedf 100755 --- a/unicorn_patron_xml2text.pl +++ b/unicorn_patron_xml2text.pl @@ -110,7 +110,8 @@ for my $patron ( $doc->documentElement->childNodes ) { my $inactive_barcode1 = ''; my $inactive_barcode2 = ''; - for my $i_bc ( $patron->findnodes( "barcode" ) ) { + my @barcodes = $patron->findnodes( "barcodes" ); + for my $i_bc ( $barcodes[0]->findnodes( "barcode" ) ) { my $active = $i_bc->getAttribute('active'); if ($active eq "0") { if (! $inactive_barcode1 ) {