File: xmlsemdiff

package info (click to toggle)
libxml-semanticdiff-perl 1.00.00-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 232 kB
  • sloc: perl: 535; xml: 532; makefile: 13
file content (27 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl -w

#########################################
# xmlsemdiff -- command-line freindly interface to
#               XML::SemanticDiff
#
########################################

use strict;
use XML::SemanticDiff;
my $diff = XML::SemanticDiff->new(keeplinenums => 1);

my ($file1, $file2) = @ARGV;
usage() unless defined $file1 and defined $file2;

foreach my $change ($diff->compare($file1, $file2)) {
    print "$change->{message} (between lines $change->{startline} and $change->{endline})\n";
}

sub usage {
   die "usage: $0 one.xml two.xml \n";
}

exit;