#!/usr/local/bin/perl-w use XML::Simple; my $xml = XML::Simple->new; my $file = $xml->XMLin('IMD025350802_000001.xml') or die$!; if (($file->{identification}{'identity'}{'format'} eq 'JPEG File Interchange Format') && ($file->{filestatus}{'well-formed'}{'content'} eq 'true') && ($file->{filestatus}{'valid'}{'content'} eq 'true')) { print "match"; } else { print "not match" }