Help for this page

Select Code to Download


  1. or download this
    my $xpc = XML::LibXML::XPathContext->new;
    $xpc->registerNs( xsi => 'http://www.w3.org/2001/XMLSchema-instance' )
    +;
    ...
    my ($schema_ns, $schema_url) = split(' ', $schema_loc);
    defined($schema_url)
       or die("...\n");
    
  2. or download this
    my $schema = XML::LibXML::Schema->new( location => $schema_url );
    eval { $schema->validate($doc); 1 }
       or die("...\n");