Subject: | XML::LibXML::Schema validate fails : XML::LibXML::Schema::validate() -- doc is not a blessed SV reference |
Hi,
I'm trying to use XML::LibXML::Schema validation and get the following error (see below); I have Perl 5.8.0, LibXML 1.58 and libxml2 2.6.16 - what is the reason for this error? Should I go back to 2.6.8? I require schema validation the most. I'm on Solaris 8 SPARC.
Thanks for any feedback,
Frederik.
use strict;
use XML::LibXML;
my $xml = 'test.xml';
my $xsd = XML::LibXML::Schema->new(location => 'test.xsd');
eval { $xsd->validate($xml); };
die "*** Source document '$xml' invalid ***\n$@" if $@;
And get the following error;
*** Source document 'test.xml' invalid ***
XML::LibXML::Schema::validate() -- doc is not a blessed SV reference at xmlValidate.pl line 10.