ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
XML::LibXML::Schema
by Kevin Spencer other posts by this author
Mar 26 2007 10:14AM messages near this date
view in the new Beta List Site
Re: Excel to XML | Re: XML::LibXML::Schema
& XSLT Hello all,

Running into a puzzler here.  I have the following test code which
parses XML and validates against a Schema:

#!/usr/bin/perl -w

use lib '/programs/lib';
use XML::LibXML;
use strict;

my $file = shift;

my $parser = XML::LibXML-> new();
my $doc;
eval { $doc = $parser-> parse_file($file); };
die $@ if $@;

my $schema = XML::LibXML::Schema-> new(location => 'foo.xsd')'
eval { $schema-> validate($doc); };
die $@ if $@;

On host A with XML::LibXML 1.61 installed this works like a charm.
Host B also has XML::LibXML 1.61 installed but I get the following
interesting error when I run the same code.  It happens when I try to
create the $schema object via XML::LibXML::Schema:

Can't locate object method "parse_location" via package
"XML::LibXML::Schema" (perhaps you forgot to load
"XML::LibXML::Schema"?) at /programs/lib/sun4-solaris/XML/LibXML.pm
line 1505

--
Kevin.
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Kevin Spencer
Richard E. Rathmann
Kevin Spencer

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved