#!/usr/bin/perl # Script to illustrate how to parse a simple XML file # and dump its contents in a Perl hash record. use XML::Simple; use XML::Parser; use LWP::Simple; use Data::Dumper; my $url= "http://xweb.geos.ed.ac.uk/~s0341330/module3/test.xml"; my $xml = get ($url) or die "I can't get the feed you want"; my $parser = XML::Simple->new( ); my $Document = $parser->XMLin("$xml"); foreach my $Placemark (@{$Document->{Placemark}}) { my $var = $Placemark->{name} . "\n"; print "$var"; }