NAME

Meta::Xml::Parsers::Def - Object to parse an XML definition of a database.

COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.

DETAILS

MANIFEST: Def.pm
PROJECT: meta
VERSION: 0.49

SYNOPSIS

package foo;
use Meta::Xml::Parsers::Def qw();
my($def_parser)=Meta::Xml::Parsers::Def->new();
$def_parser->parsefile($file);
my($def)=$def_parser->get_result();

DESCRIPTION

This object will create a Meta::Db::Def for you from an xml definition for a database structure. This object extends XML::Parser and there is no doubt that this is the right way to go about implementing such an object (all the handles get the parser which is $self if you extend the parser which makes them methods and everything is nice and clean from there on...). The reason we dont inherit from XML::Parser is that the parser which actually gets passed to the handlers is XML::Parser::Expat (which is the low level object) and we inherit from that to get more object orientedness.

An issue to be considered is what happens if some elements are missing (the author want to put them in). For this case we create the basic object at the begining.

FUNCTIONS

new($)
get_result($)
handle_start($$)
handle_end($$)
handle_char($$)
TEST($)

FUNCTION DOCUMENTATION

new($)

This gives you a new object for a parser.

get_result($)

This method will retrieve the result of the parsing process.

handle_start($$)

This will handle start tags. This will create new objects according to the context.

handle_end($$)

This will handle end tags. This currently does nothing.

handle_char($$)

This will handle actual text. This currently, according to context, sets attributes for the various objects.

TEST($)

Test suite for this module. Currently it will just read the "xmlx/def/chess.def" file and print out the resulting Def object.

SUPER CLASSES

Meta::Xml::Parsers::Base(3)

BUGS

None.

AUTHOR

Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER

HISTORY

0.00 MV ok. This is for real
0.01 MV convert all database descriptions to XML
0.02 MV ok - this time I realy mean it
0.03 MV make quality checks on perl code
0.04 MV more perl checks
0.05 MV make Meta::Utils::Opts object oriented
0.06 MV check that all uses have qw
0.07 MV fix todo items look in pod documentation
0.08 MV more on tests/more checks to perl
0.09 MV more perl code quality
0.10 MV fix all tests change
0.11 MV change new methods to have prototypes
0.12 MV correct die usage
0.13 MV perl code quality
0.14 MV more perl quality
0.15 MV more perl quality
0.16 MV perl documentation
0.17 MV more perl quality
0.18 MV perl qulity code
0.19 MV more perl code quality
0.20 MV revision change
0.21 MV languages.pl test online
0.22 MV history change
0.23 MV db stuff
0.24 MV perl reorganization
0.25 MV fix up xml parsers
0.26 MV c++ stuff
0.27 MV advance the contacts project
0.28 MV perl packaging
0.29 MV more perl packaging
0.30 MV XSLT, website etc
0.31 MV db inheritance
0.32 MV PDMT
0.33 MV md5 project
0.34 MV database
0.35 MV perl module versions in files
0.36 MV movies and small fixes
0.37 MV md5 progress
0.38 MV more Class method generation
0.39 MV more thumbnail code
0.40 MV thumbnail user interface
0.41 MV dbman package creation
0.42 MV more thumbnail issues
0.43 MV website construction
0.44 MV web site automation
0.45 MV SEE ALSO section fix
0.46 MV download scripts
0.47 MV web site development
0.48 MV teachers project
0.49 MV md5 issues

SEE ALSO

Meta::Db::Constraint(3), Meta::Db::Def(3), Meta::Db::Enum(3), Meta::Db::Field(3), Meta::Db::Member(3), Meta::Db::Set(3), Meta::Db::Table(3), Meta::Db::User(3), Meta::Development::Module(3), Meta::Utils::Output(3), Meta::Xml::Parsers::Base(3), strict(3)

TODO

Nothing.