xerces-p-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas Armstrong <tarmstr...@gmail.com>
Subject How to parse an HTTP file
Date Sat, 13 Nov 2004 10:39:05 GMT
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: xerces-p-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-p-dev-help@xml.apache.org


Mime
View raw message