The output should have all ads - <nis:NISJob>...</nis:NISJob> that have a JobActiveDate of today. What I get in the output file is just the last ad - <nis:NISJob>...</nis:NISJob> in the file with today's JobActiveDate. Yup, forgot to take out some testing trash on the sub:
sub DumpOldAds { my ($twig,$nisNISJob)=@_; my $date = UnixDate("today", "%Y-%m-%d".'T00:00:00'); chomp $date; my $adate = $nisNISJob->findvalue('//JobActiveDate'); print "\n$adate -|- $date\n"; if( $adate ne $date) { $nisNISJob->delete; }; #else {$twig->flush;}; }
In reply to Re^2: XML::Twig output problem
by plockhart
in thread XML::Twig output problem
by plockhart
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |