1XML::LibXML::Schema(3)User Contributed Perl DocumentationXML::LibXML::Schema(3)
2
3
4

NAME

6       XML::LibXML::Schema - XML Schema Validation
7

SYNOPSIS

9         $xmlschema = XML::LibXML::Schema->new( location => $filename_or_url );
10         $xmlschema = XML::LibXML::Schema->new( string => $xmlschemastring );
11         eval { $xmlschema->validate( $doc ); };
12

DESCRIPTION

14       The XML::LibXML::Schema class is a tiny frontend to libxml2's XML
15       Schema implementation. Currently it supports only schema parsing and
16       document validation.
17
18       new
19             $xmlschema = XML::LibXML::Schema->new( location => $filename_or_url );
20             $xmlschema = XML::LibXML::Schema->new( string => $xmlschemastring );
21
22           The constructor of XML::LibXML::Schema may get called with either
23           one of two parameters. The parameter tells the class from which
24           source it should generate a validation schema. It is important,
25           that each schema only have a single source.
26
27           The location parameter allows to parse a schema from the filesystem
28           or a URL.
29
30           The string parameter will parse the schema from the given XML
31           string.
32
33           Note that the constructor will die() if the schema does not meed
34           the constraints of the XML Schema specification.
35
36       validate
37             eval { $xmlschema->validate( $doc ); };
38
39           This function allows to validate a document against the given XML
40           Schema. If this function succeeds, it will return 0, otherwise it
41           will die() and report the errors found. Because of this validate()
42           should be always evaluated.
43

AUTHORS

45       Matt Sergeant, Christian Glahn, Petr Pajas,
46

VERSION

48       1.62
49
51       2001-2006, AxKit.com Ltd; 2002-2006 Christian Glahn; 2006 Petr Pajas,
52       All rights reserved.
53
54
55
56perl v5.8.8                       2006-11-17            XML::LibXML::Schema(3)
Impressum