Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: XML::Twig output problem

by toolic (Bishop)
on Jan 05, 2012 at 18:12 UTC ( #946443=note: print w/replies, xml ) Need Help??

in reply to XML::Twig output problem

The code you posted has compile errors for me (DumpOldAds and extra semicolons). Are you sure this is the code you are using? If not, please update the OP.

Also, please post the exact output you expect.

Replies are listed 'Best First'.
Re^2: XML::Twig output problem
by plockhart (Initiate) on Jan 05, 2012 at 19:14 UTC

    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;}; }

      Make that the first ad not the last, sorry, long week. If I flush it, it deletes all the ads even though the comparison is valid to keep them!

        If I flush it, it deletes all the ads even though the comparison is valid to keep them!

        Sounds like nonsense. flush is used for printing the twig to output. If that isn't what you want, stop flushing

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://946443]
[choroba]: Also, I'd try starting the App with the US layout and switch to the dead keys layout later
[Tux]: no, it was not .xinput related, but that did ring a bell. digging in my $ENV I found the cause: XMODIFIERS=@im=xim
[Tux]: Héŀłő çřűèļ ŵøŗľđ, ıŧ'š ºvəř
[choroba]: ÿǎÿ!

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2017-09-25 20:54 GMT
Find Nodes?
    Voting Booth?
    During the recent solar eclipse, I:

    Results (290 votes). Check out past polls.