Manual Pages for UNIX Darwin command on man XML::SAX::DocumentLocator
MyWebUniversity

Manual Pages for UNIX Darwin command on man XML::SAX::DocumentLocator

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

NAME

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

SYNOPSIS

my $locator = XML::SAX::DocumentLocator->new(

sub { $object->getpublicid },

sub { $object->getsystemid },

sub { $reader->currentline },

sub { $reader->currentcolumn },

sub { $reader->getencoding },

sub { $reader->getxmlversion },

);

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 setdocumentlocator(). See the source code for XML::SAX::PurePerl for a usage example. AAPPII 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)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™