Parser::Style::Stream



Parser::Style::Stream

NAME
SYNOPSIS
DESCRIPTION

NAME

XML::Parser::Style::Stream − Stream style for XML::Parser

SYNOPSIS

  use XML::Parser;
  my $p = XML::Parser−>new(Style => 'Stream', Pkg => 'MySubs');
  $p−>parsefile('foo.xml');
  {
    package MySubs;
    sub StartTag {
      my ($e, $name) = @_;
      # do something with start tags
    }
    sub EndTag {
      my ($e, $name) = @_;
      # do something with end tags
    }
    sub Characters {
      my ($e, $data) = @_;
      # do something with text nodes
    }
  }

DESCRIPTION

This style uses the Pkg option to find subs in a given package to call for each event. If none of the subs that this style looks for is there, then the effect of parsing with this style is to print a canonical copy of the document without comments or declarations. All the subs receive as their 1st parameter the Expat instance for the document they’re parsing.

It looks for the following routines:

StartDocument

Called at the start of the parse .

StartTag

Called for every start tag with a second parameter of the element type. The $_ variable will contain a copy of the tag and the %_ variable will contain attribute values supplied for that element.

EndTag

Called for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag.

Text

Called just before start or end tags with accumulated non-markup text in the $_ variable.

PI

Called for processing instructions. The $_ variable will contain a copy of the PI and the target and data are sent as 2nd and 3rd parameters respectively.

EndDocument

Called at conclusion of the parse.



More Linux Commands

manpages/csin.3.html
csin(3) - complex sine function (Library - Linux man page)
The complex sine function is defined as: csin(z) = (exp(i * z) - exp(-i * z)) / (2 * i) VERSIONS These functions first appeared in glibc in version 2.1. CONFORM

manpages/resgen.1.html
resgen(1) - Mono/CLI Resource Generator - Linux manual page
Convert a resource file from one format to another. The currently supported formats are text, resources, resx and po. .txt, .text Used to process text files, th

manpages/growisofs.1.html
growisofs(1) - combined mkisofs frontend/DVD recording progr
growisofs was originally designed as a frontend to mkisofs to facilitate appending of data to ISO9660 volumes residing on random-access media such as DVD+RW, DV

manpages/irqbalance.1.html
irqbalance(1) - distribute hardware interrupts across proces
The purpose of irqbalance is distribute hardware interrupts across processors on a multiprocessor system in order to increase performance. OPTIONS -o, --oneshot

manpages/glIndexdv.3gl.html
glIndexdv(3gl) - set the current color index (Man Page).....
glIndex updates the current (single-valued) color index. It takes one argument, the new value for the current color index. The current index is stored as a floa

manpages/_Exit.2.html
_Exit(2) - terminate the calling process - Linux man page...
The function _exit() terminates the calling process immediately. Any open file descriptors belonging to the process are closed; any children of the process are

manpages/Net::Server::Proto::SSLEAY.3pm.html
Net::Server::Proto::SSLEAY(3pm) - Custom Net::Server SSL pro
This module is relatively new and has only served a couple of months in production environments. If anybody has any successes or ideas for improvment under SSLE

manpages/Tcl_SetListObj.3.html
Tcl_SetListObj(3) - manipulate Tcl objects as lists.........
Tcl list objects have an internal representation that supports the efficient indexing and appending. The procedures described in this man page are used to creat

manpages/sane-dc25.5.html
sane-dc25(5) - SANE backend for Kodak DC20/DC25 Digital Came
The sane-dc25 library implements a SANE (Scanner Access Now Easy) backend that provides access to Kodak DC20 and DC25 cameras. At present, only the DC25 has bee

manpages/libstorage.3.html
libstorage(3) - InterNetNews Storage API library routines...
Libstorage is a library of common utility (the storage manager) routines for accessing Usenet articles and related data independent of particular storage method

manpages/cacoshf.3.html
cacoshf(3) - complex arc hyperbolic cosine - Linux man page
The cacosh() function calculates the complex arc hyperbolic cosine of z. If y = cacosh(z), then z = ccosh(y). The imaginary part of y is chosen in the interval

manpages/siga.1.html
siga(1) System Information GAthering - Linux manual page....
This is siga, System Information GAthering. It collects various information on your system and outputs it in HTML or ASCII format. Since it needs root permissio





We can't live, work or learn in freedom unless the software we use is free.