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]> |
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
======================================
Does anybody know, where the problem is?
J. J.
_______________________________________________
Perl-XML mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs