From a51adaefa8666dc462d255280d8beca0506bf0c2 Mon Sep 17 00:00:00 2001 From: Jason Etheridge Date: Tue, 19 Aug 2008 05:56:16 +0000 Subject: [PATCH] findnodes only looks at immediate children --- unicorn_patron_xml2text.pl | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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 ) { -- 1.7.2.5