SAX::DocumentLocator

NAME
SYNOPSIS
DESCRIPTION
API

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.

Open Source


Harvard - MIT - Stanford - The open edX platform delivers free online courses from Harvard, MIT, Columbia, UC Berkeley and other top Universities. Hundreds of courses are available and include almost all major subject areas and course levels. Paid courses and certifications are also available.

US Navy - The US Navy's most advanced warship is powered by Linux. The next generation warship is a guided missile destroyer. It uses Red Hat Enterprise Linux along with Fedora as its operating systems. The Navy also utilizes Linux to run it's drone fleet. Government use of open source continues to expand.

Free Office Software - The Libre Office Suite is available for Linux or Windows and incldues, Writer, the word processor, Calc, the spreadsheet application, Impress, the presentation engine, Draw, our drawing and flowcharting application, Base, our database and database frontend, and Math for editing mathematics.

5 Billion Dollars of Free Software - The Linux Foundation released a report estimating the value of their open source projects at 5 billion. This software is yours for free. Governments and large corporations are using this incredible gift to their advantage every day. Learn how open source can benefit you.

Open Government - NASA, The White House and the Department of Defense are among government organizations with major open source deployments. Through the data.gov website which is part of the open government initiative, agencies deliver 180,000 data sets with open source access.

Competitive Advantage - Goldman Sachs, IBM and countless large corporations are leveraging open source to reduce costs, develop products and increase their bottom lines. Learn what these companies think about open source and how open source can give you the competitive advantage.

find - The find program searches for files that match the specified criteria and optionally executes some function on those files. Find can compare or identify files based on name, location, type, size, creation and many more attributes. find is a very useful and powerful command line utility.

More Linux Commands


svnadmin (1)         - Subversion repository administration tool
svnadmin.1 - Subversion is a version control system, which allows you to keep old versions of files and directories (usually source code), keep a log of who, wh...

glutSolidDodecahedron (3) - render a solid or wireframe dodecahedron (12-side...
glutSolidDodecahedron and glutWireDodecahedron render a solid or wireframe dodecahedron respectively centered at the modeling coordinates origin with a radius o...

pam_tally (8)        - The login counter (tallying) module
This module maintains a count of attempted accesses, can reset count on success, can deny access if too many attempts fail. pam_tally has several limitations, w...

create_module (2)    - create a loadable module entry
Note: This system call is present only in kernels before Linux 2.6. create_module() attempts to create a loadable module entry and reserve the kernel memory tha...

backtrace (3)        - support for application self-debugging
backtrace() returns a backtrace for the calling program, in the array pointed to by buffer. A backtrace is the series of currently active function calls for the...

sis (4)              - SiS and XGI video driver
sis is an Xorg driver for SiS (Silicon Integrated Systems) and XGI video chips. The driver is accelerated and provides support for colordepths of 8, 16 and 24 b...

spufs (7)            - SPU file system
The SPU filesystem is used on PowerPC machines that implement the Cell Broadband Engine Architecture in order to access Synergistic Processor Units (SPUs). The...

form_opts (3form)    - set and get form options
form_opts.3form - The function set_form_opts sets all the given forms option bits (form option bits may be logically-ORed together). The function form_opts_on t...

git-blame (1)        - Show what revision and author last modified each line ...
Annotates each line in the given file with information from the revision which last modified the line. Optionally, start annotating from the given revision. Whe...

dsaparam (1ssl)      - DSA parameter manipulation and generation
This command is used to manipulate or generate DSA parameter files. OPTIONS -inform DER|PEM This specifies the input format. The DER option uses an ASN1 DER enc...

XFreeExtensionList (3) - list available extensions
The XQueryExtension function determines if the named extension is present. If the extension is not present, XQueryExtension returns False; otherwise, it returns...

XkbAllocGeomOverlays (3) - Allocate overlays in a section
XkbAllocGeomOverlays.3 - Xkb provides a number of functions to allocate and free subcomponents of a keyboard geometry. Use these functions to create or modify k...

nntptest (1)         - interactive NNTP test program
nntptest is a utility that allows you to authenticate to a NNTP server and interactively issue commands to it. Once authenticated you may issue any NNTP command...

dnsdomainname (1)    - show the system’s DNS domain name
Hostname is the program that is used to either set or display the current host, domain or node name of the system. These names are used by many of the networkin...

nntpsend (8)         - send Usenet articles to remote site
Nntpsend is a front-end that invokes innxmit(1) to send Usenet articles to a remote NNTP site. The sites to be fed may be specified by giving sitename fqdn pair...