ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

For more information about the manual page format, see the manual page for manpages(5).



SAX::DocumentLocator(3)              User Contributed Perl Documentation             SAX::DocumentLocator(3)



NAME
       XML::SAX::DocumentLocator - Helper class for document locators

SYNOPSIS
         my $locator = XML::SAX::DocumentLocator->new(
             sub { $object->get_public_id },
             sub { $object->get_system_id },
             sub { $reader->current_line },
             sub { $reader->current_column },
             sub { $reader->get_encoding },
             sub { $reader->get_xml_version },
         );

DESCRIPTION
       This module gives you a tied hash reference that calls the specified closures when asked for
       PublicId, SystemId, LineNumber and ColumnNumber.

       It is useful for writing SAX Parsers so that you don't have to constantly update the line numbers in
       a hash reference on the object you pass to set_document_locator(). See the source code for
       XML::SAX::PurePerl for a usage example.

API
       There is only 1 method: "new". Simply pass it a list of closures that when called will return the
       PublicId, the SystemId, the LineNumber, the ColumnNumber, the Encoding and the XMLVersion
       respectively.

       The closures are passed a single parameter, the key being requested. But you're free to ignore that.



perl v5.8.8                                      2005-10-14                          SAX::DocumentLocator(3)

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.