diptiman has asked for the wisdom of the Perl Monks concerning the following question:
Hi ,
I have written a script to parse an XML file using XML::DOM . But , the problem is , the file has to be retrieved from an URL which is something like : " http://abc.def/xyz.xml " I have tried adding it to ARGV[0] . But, then it does not work. The script needs to run in the following way :
perl parsingscript.pl http://abc.def/xyz.xmlThe way I tried was :
my $file = 'http://abc.def/xyz.xml ' my $doc = $parser->parsefile($file)
But, this does not work.
Could you tell me please, how to retrieve this XML file from this URL and parse it by using it as a commmand line argument ?
Edited 2002-06-24 by mirod:added code and p tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: source XML as URL in command line
by mattriff (Chaplain) on Jun 24, 2002 at 04:01 UTC | |
|
Re: source XML as URL in command line
by Matts (Deacon) on Jun 24, 2002 at 07:10 UTC |