&{$self->{handlers}{char}}($self, substr($self->{doc}, $end_pos + 1, $start_pos - $end_pos - 1)) if defined $self->{handlers}{char};
 
############################################################
#
# Module: XML::Lite
#
# Created: 25 August 2001 by Jeremy Wadsack for Wadsack-Allen Digital Group
# Copyright (C) 2001 Wadsack-Allen. All rights reserved.
#
#   TODO
#       * Need to support <!...> for doctypes, and doctype delarations
#       * Could add a method 'element' that accepts path-like syntax
#       * Could add write_to_file, to_string, etc. methods (requires that the orig doc be preserved!)
#       * Could improve support for comments, CDATA, PI's etc as objects?
#       * Expose handler interface
#       * Expose a method to provide better error handling
#
############################################################
# Date        Modification                            Author
# ----------------------------------------------------------
# 04.Sep.2001 Fixed lots of bugs and built tests          JW
# 08.Sep.2001 Added linked list & handlers to parser      JW
# 04.Nov.2001 Fixed bug in parameter handling             JW
############################################################
package XML::Lite;
use strict;
#$^W=1;     # 'use warnings;' in perl 5.005_62 and later
=head1 NAME
XML::Lite - A lightweight XML parser for simple files
=head1 SYNOPSIS
use XML::Lite;
my $xml = new XML::Lite( xml => 'a_file.xml' );
=head1 DESCRIPTION
XML::Lite is a lightweight XML parser, with basic element traversing 
methods. It is entirely self-contained, pure Perl (i.e. I<not> based on 
expat). It provides useful methods for reading most XML files, including 
traversing and finding elements, reading attributes and such. It is 
designed to take advantage of Perl-isms (Attribute lists are returned as 
hashes, rather than, say, lists of objects). It provides only methods 
for reading a file, currently.
=head1 METHODS
The following methods are available:
=over 4