mamf0 has asked for the wisdom of the Perl Monks concerning the following question:
To set the handlers I am appying the same logic I used for my parser, so I end up with something like this, but I keep getting various errors.my $diff = XML::SemanticDiff->new(); foreach my $change ($diff->compare($file, $file2)) { print "$change->{message} in context $change->{context}\n"; }
Am I on the right track here?my $diff = new XML::SemanticDiff->new(keepdata); $diff->setHandlers(rogue_element => \&rogueElement); $diff->compare($xmlToday,$xmlYesterday)); sub rogueElement{ print "something\n"; }
Edited by thelenm: added <code> tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setHandlers for XML::SemanticDiff
by bobn (Chaplain) on Jul 20, 2003 at 19:13 UTC | |
|
Re: setHandlers for XML::SemanticDiff
by bobn (Chaplain) on Jul 20, 2003 at 19:52 UTC |