in reply to setHandlers for XML::SemanticDiff
The doc for XML::SemanticDiff shows no setHandlers method. XML::Parser is used but not inherited from in this package, near as I can tell.
The doc does show a diffhandler option to new(), which would apparently be used as:
#!/usr/bin/perl -w my $h = Myclass->new; use XML::SemanticDiff; my $diff = XML::SemanticDiff->new(diffhandler => $h); $diff->compare( qw(1.xml 2.xml)); package Myclass; use Data::Dumper; sub new { bless {}, shift } sub rogue_element { my ( $self, $name, $props ) = @_; print "Something\n"; print "Element name is: $name\n"; print Dumper($props); }
Updated with correct code.
--Bob Niederman, http://bob-n.com
|
|---|