--- trunk/lib/WebPAC/Input/XML.pm 2007/11/02 13:59:10 968 +++ trunk/lib/WebPAC/Input/XML.pm 2007/11/04 11:17:21 984 @@ -72,7 +72,7 @@ $log->info("found ", $#files + 1, " XML files in ", $arg->{path}); - $self->{_files} = \@files; + $self->{_files} = [ sort @files ]; $self ? return $self : return undef; } @@ -92,8 +92,23 @@ my $path = $self->{_files}->[ $mfn - 1 ] || return; - warn "### fetch_rec( $mfn ) = $path"; + my $log = $self->_get_logger(); + my $xml = XMLin( + $path, +# ForceArray => 1, +# ForceContent => 1, +# KeepRoot => 1, +# SuppressEmpty => 1, # '' undef + + ) || $log->logdie("can't open $path: $!"); + + $log->debug("fetch_rec( $mfn ) => $path => xml is ",sub { dump($xml) }); + + # add mfn + $xml->{'000'} = [ $mfn ]; + + return $xml; }