Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

vend::parser(3pm) [debian man page]

Vend::Parser(3pm)					User Contributed Perl Documentation					 Vend::Parser(3pm)

NAME
Vend::Parser - Interchange parser class DESCRIPTION
"Vend::Parser" will tokenize a Interchange page when the $p->parse() method is called. The document to parse can be supplied in arbitrary chunks. Call $p->eof() the end of the document to flush any remaining text. The return value from parse() is a reference to the parser object. $self->start($tag, $attr, $attrseq, $origtext) This method is called when a complete start tag has been recognized. The first argument is the tag name (in lower case) and the second argument is a reference to a hash that contain all attributes found within the start tag. The attribute keys are converted to lower case. Entities found in the attribute values are already expanded. The third argument is a reference to an array with the lower case attribute keys in the original order. The fourth argument is the original Interchange page. $self->end($tag) This method is called when an end tag has been recognized. The argument is the lower case tag name. $self->text($text) This method is called when plain text in the document is recognized. The text is passed on unmodified and might contain multiple lines. Note that for efficiency reasons entities in the text are not expanded. COPYRIGHT
Copyright 2002-2007 Interchange Development Group Copyright 1997-2002 Red Hat, Inc. Original HTML::Parser module copyright 1996 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHORS
Vend::Parser - Mike Heins <mike@perusion.com> HTML::Parser - Gisle Aas <aas@sn.no> perl v5.14.2 2010-03-25 Vend::Parser(3pm)

Check Out this Related Man Page

Parser::Style::Stream(3pm)				User Contributed Perl Documentation				Parser::Style::Stream(3pm)

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: o StartDocument Called at the start of the parse . o 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. o EndTag Called for every end tag with a second parameter of the element type. The $_ variable will contain a copy of the end tag. o Text Called just before start or end tags with accumulated non-markup text in the $_ variable. o 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. o EndDocument Called at conclusion of the parse. perl v5.14.2 2011-05-25 Parser::Style::Stream(3pm)
Man Page

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parse HTML tag parameters and text

Hi! I have a bunch of HTML files, which I want to parse to CSV files. Every page has a table in it, and I need to parse each row into a csv record. With awk and sed, I managed to put every table row in separate lines. So my file looks like this: <TR> .... </TR> <TR> .... </TR> ...One... (1 Reply)
Discussion started by: senszey
1 Replies

2. Programming

Parser

Hi Everyone I have an out put of multiple lines which I would like to parse and retrieve certain info from it. The output consists of multiple sections that starts with the line Client: and ends with STL tag: each section separated by an empty line. So basically somehting like Client: ... (10 Replies)
Discussion started by: bombcan1
10 Replies

3. UNIX for Dummies Questions & Answers

Concatenate three lines into one

Hi. I'm new to this forum. I am attempting to parse an Audit Log from Cognos/TM1, selecting only Event IDs of "client" which are found on the "start-tag" record. These Logs are in a pseudo-XML format but not a true XML format. I want to FTP an Audit Log File from the Cognos server to our UNIX... (7 Replies)
Discussion started by: FredAtArrow
7 Replies

4. Shell Programming and Scripting

Parser

Hi All, I am trying to create a parser to find out what cobol programs are being called by which JCL's. I need to search recursively until the main cobol program is found being called by a JCL. I tried to create a script but I am not able to generalize it. Can someone please help. ... (1 Reply)
Discussion started by: nua7
1 Replies