2002/ws/desc/tools prevloc,NONE,1.1

Update of /sources/public/2002/ws/desc/tools
In directory homer:/tmp/cvs-serv14835

Added Files:
	prevloc 
Log Message:
Give the URL of the previous location

--- NEW FILE: prevloc ---
#!/usr/bin/perl -w
#
# Give the URL of the previous location

use strict;
use XML::DOM;

my $file = $ARGV[0] || die;
my @files;

my $parser = new XML::DOM::Parser;
my $doc = $parser->parsefile($file) || die;
my $prevlocs = $doc->getElementsByTagName('prevlocs')  || die;
my $prevloc = $prevlocs->item(0) || die;
my $locs = $prevloc->getElementsByTagName('loc') || die;
my $loc = $locs->item(0) || die;
my $href = $loc->getAttributeNode('href') || die;
print $href->getValue(). "\n" || die;

Received on Friday, 30 July 2004 04:51:26 UTC