Hi.

I'm trying to parse a HTTP file
http://www.foo.com/foo.xml

------------------------------------------
use XML::Xerces;

my $file  = 
XML::Xerces::LocalFileInputSource->new("http://www.foo.com/foo.xml";);
my $parser = XML::Xerces::XercesDOMParser->new();
eval { $parser->parse($file); };
error($@,"Couldn't parse file: $ARGV[0]") if $@;
my $doc = $parser->getDocument();
---------------------------------------------

But I'm not able. I get this error message:
----------------------------
Can't call method "getDocumentElement" on an undefined value at
parse_url.pl line 7.
---------------------------

What am I doing wrong? Thank you very much.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to