GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  XML::VALIDATE::BASE (3)

.ds Aq ’

NAME

XML::Validate::Base - Abstract base class to be used by XML::Validate modules

CONTENTS

SYNOPSIS



  use XML::Validate::Base;
 
  sub new {
    ... override new ...
  }
 
  sub validate {
    ... override validate ...
  }



DESCRIPTION

XML::Validate::Base provides a base class with helpful subs for real XML::Validate modules.

METHODS

new(%options) Constructs a new validator. This method must be overridden.
validate($xml) Parses and validates $xml. Returns a true value on success, undef on failure. This method must be overridden.
options An accessor for the options hashref.
set_options($supplied_options,$valid_options) Sets the options for the validator. $supplied_options and $valid_options are hash refs containing respectively the options supplied to the constructor and the valid options for validator along with their default values.

If the supplied options hash ref contains an option not listed in valid options, this sub throws an exception.

last_error Returns the error from the last validate call. This is a hash ref with the following fields:
o message
o line
o column

Note that the error gets cleared at the beginning of each validate call.

add_error($error) Stores $error for retrieval by last_error. $error should be a hash ref.
clear_errors Clears any errors held by the validator.

VERSION

$Revision: 1.9 $ on $Date: 2005/09/06 11:05:08 $ by $Author: johna $

AUTHOR

Colin Robertson <cpan _at_ bbc _dot_ co _dot_ uk>

COPYRIGHT

(c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL. See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 XML::VALIDATE::BASE (3) 2006-04-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.