use XML::Parser;$parser = new XML::Parser( Style => 'Tree' );my $tree = $parser->parsefile( shift @ARGV );# serialize the structureuse Data::Dumper;print Dumper( $tree );