Re: Can't locate object method "load_xml" via package "XML::LibXML"

Jakub Jezek <[email protected]>
Newsgroups gmane.comp.lang.perl.xml
Message-ID <[email protected]>
Shlomi Fish wrote:
> On Monday 07 Dec 2009 17:25:40 Jakub Jezek wrote:
>   
>> I'll try to make this basic perl script run on basic XSLTs, but I'm
>> getting this error all the time? I 've seen  this usage in Perl and XML
>> Book from O-Reilly publisher.
>>
>> My code:
>> ===========================================
>>
>> use XML::LibXSLT;
>> use XML::LibXML;
>>
>> my $xslt = XML::LibXSLT->new();
>> my $source = XML::LibXML->load_xml(location =>
>> 'com.redhat.rhsa-20091463.xml');
>>
>> my $style_doc = XML::LibXML->load_xml(location=>'test5.xsl', no_cdata=>1);
>> my $stylesheet = $xslt->parse_stylesheet($style_doc);
>>
>> my $results = $stylesheet->transform($source);
>> print $stylesheet->output_as_bytes($results);
>> ===========================================
>>
>> There is a log:
>> ======================================
>> Can't locate object method "load_xml" via package "XML::LibXML" at test5.pl
>>         line 22 (#1)
>>     (F) You called a method correctly, and it correctly indicated a package
>>     functioning as a class, but that package doesn't define that particular
>>     method, nor does any of its base classes.  See perlobj.
>>
>> Uncaught exception from user code:
>>         Can't locate object method "load_xml" via package "XML::LibXML"
>> at test5.pl line 22.
>>  at test5.pl line 22
>> ======================================
>>
>>     
>
> Based on this message it seems that your XML::LibXML installation is broken. 
> How did you install it?
>
> Regards,
>
> 	Shlomi Fish
>
>   
>> Does anybody know, where the problem is?
>>
>> J. J.
>> _______________________________________________
>> Perl-XML mailing list
>> [email protected]
>> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>>
>>     
>
>   
I've installed it with apt-get tool.  I use Ubuntu 8.04. I've manualy 
chosen packages aditional packages for xslt and perl.

J.
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.