thanks for that bluemin, here's another solution that worked:
Code:
#! /usr/bin/perl
# Craig R Morton
# Count number of nodes in an XML document
# Last_Edit: 08-Dec-2006
use warnings;
use strict;
use XML::Simple; # you will need to have this installed on your machine
# read the xml document 'employees.xml' as the input
my $xml = XMLin('employees.xml');
# get the number of nodes called 'employee'
my $count = @{$xml->{employee}};
print "We have $count employees\n";
www.crmpicco.co.uk
www.ie7.com