Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hey,

i have this simple code, but always gives me an error. I think it has to do something with the installation?
use XML::LibXML; use Data::Dumper; my $xml_feed = "C:/xml_learn/g_headlines.xml"; my $parser = XML::LibXML->new; my $dom = $parser->parse_file($xml_feed) or die; my @titles = $dom->getElementsByTagName("title"); foreach my $t (@titles) { print $t->firstChild->data, "\n"; }
Now it always prints the error:
Can't load 'C:/Perl/site/lib/auto/XML/LibXML/Common/Common.dll' for mo +dule XML::LibXML::Common: load_file:Access is denied at C:/Perl/lib/D +ynaLoader.pm line 230. at C:/Perl/site/lib/XML/LibXML.pm line 11
I installed XML::LibXML through the ActiveState PPM3 and it asked me if I wanted to install the libxml2.dll. I also searched for "common.dll" and its located in the correct directory as the one listed in the error

What am I doing wrong? Do i need to install another module or install something else to get this working?

thanks

Replies are listed 'Best First'.
Re: Trying to use XML::LibXML
by Courage (Parson) on May 29, 2005 at 22:18 UTC
    If error message is right, then your Common.dll file does not have executable permission, while it should have.
    Starting from some service packs on Windows system OS removed executable permission from unpacked files, so to avoid virus invocation.

    Look into that file's properties.

Re: Trying to use XML::LibXML
by Anonymous Monk on May 29, 2005 at 21:15 UTC
    How is Access is denied related to C:/Perl/site/lib/auto/XML/LibXML/Common/Common.dll?