YAPE::HTML 1.11
Sponsored Links
YAPE::HTML 1.11 Ranking & Summary
File size:
0.019 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
861
Date added:
2007-07-11
Publisher:
Jeff Pinyan
YAPE::HTML 1.11 description
YAPE::HTML is Yet Another Parser/Extractor for HTML.
SYNOPSIS
use YAPE::HTML;
use strict;
my $content = "< html>...< /html>";
my $parser = YAPE::HTML->new($content);
my ($extor,@fonts,@urls,@headings,@comments);
# here is the tokenizing part
while (my $chunk = $parser->next) {
if ($chunk->type eq tag and $chunk->tag eq font) {
if (my $face = $chunk->get_attr(face)) {
push @fonts, $face;
}
}
}
# here we catch any errors
unless ($parser->done) {
die sprintf "bad HTML: %s (%s)",
$parser->error, $parser->chunk;
}
# here is the extracting part
# < A> tags with HREF attributes
# < IMG> tags with SRC attributes
$extor = $parser->extract(a => [href], img => [src]);
while (my $chunk = $extor->()) {
push @urls, $chunk->get_attr(
$chunk->tag eq a ? href : src
);
}
# < H1>, < H2>, ..., < H6> tags
$extor = $parser->extract(qr/^h[1-6]$/ => []);
while (my $chunk = $extor->()) {
push @headings, $chunk;
}
# all comments
$extor = $parser->extract(-COMMENT => []);
while (my $chunk = $extor->()) {
push @comments, $chunk;
}
YAPE MODULES
The YAPE hierarchy of modules is an attempt at a unified means of parsing and extracting content. It attempts to maintain a generic interface, to promote simplicity and reusability. The API is powerful, yet simple. The modules do tokenization (which can be intercepted) and build trees, so that extraction of specific nodes is doable.
This module is yet another parser and tree-builder for HTML documents. It is designed to make extraction and modification of HTML documents simplistic. The API allows for easy custom additions to the document being parsed, and allows very specific tag, text, and comment extraction.
SYNOPSIS
use YAPE::HTML;
use strict;
my $content = "< html>...< /html>";
my $parser = YAPE::HTML->new($content);
my ($extor,@fonts,@urls,@headings,@comments);
# here is the tokenizing part
while (my $chunk = $parser->next) {
if ($chunk->type eq tag and $chunk->tag eq font) {
if (my $face = $chunk->get_attr(face)) {
push @fonts, $face;
}
}
}
# here we catch any errors
unless ($parser->done) {
die sprintf "bad HTML: %s (%s)",
$parser->error, $parser->chunk;
}
# here is the extracting part
# < A> tags with HREF attributes
# < IMG> tags with SRC attributes
$extor = $parser->extract(a => [href], img => [src]);
while (my $chunk = $extor->()) {
push @urls, $chunk->get_attr(
$chunk->tag eq a ? href : src
);
}
# < H1>, < H2>, ..., < H6> tags
$extor = $parser->extract(qr/^h[1-6]$/ => []);
while (my $chunk = $extor->()) {
push @headings, $chunk;
}
# all comments
$extor = $parser->extract(-COMMENT => []);
while (my $chunk = $extor->()) {
push @comments, $chunk;
}
YAPE MODULES
The YAPE hierarchy of modules is an attempt at a unified means of parsing and extracting content. It attempts to maintain a generic interface, to promote simplicity and reusability. The API is powerful, yet simple. The modules do tokenization (which can be intercepted) and build trees, so that extraction of specific nodes is doable.
This module is yet another parser and tree-builder for HTML documents. It is designed to make extraction and modification of HTML documents simplistic. The API allows for easy custom additions to the document being parsed, and allows very specific tag, text, and comment extraction.
YAPE::HTML 1.11 Screenshot
YAPE::HTML 1.11 Keywords
HTML
YAPE
Yet Another Parser
HTML 1.11
yet another
For HTML
chunk
tag
1.11
YAPE::HTML
YAPEHTML
YAPE::HTML 1.11
Libraries
Programming
Bookmark YAPE::HTML 1.11
YAPE::HTML 1.11 Copyright
WareSeeker periodically updates pricing and software information of YAPE::HTML 1.11 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of YAPE::HTML 1.11 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
what does html stand for
html codes for myspace
yet another warcraft lan emulator
color codes for html
html source for a guestbook
html tags
yet another fantasy gamer comic
for html code
html code
cool html codes for myspace
backgrounds for html
yet another hierarchical officious oracle
chunky's
yet another side of me part 1
videos for html
html body html
music codes for html
for html tag
Related Software
HTMLab is a tool for demonstrating and experimenting with HTML markup. Free Download
Copy as HTML Link is a Firefox extension that creates an HTML link to the current page using the selected text and copies it. Free Download
Blatte::HTML is a Perl module that contains tools for generating HTML with Blatte. Free Download
HTML::LoL is a Perl module that can construct HTML from pleasing Perl data structures. Free Download
Oak::Web::HTML::B is B HTML Tag. Free Download
Oak::Web::HTML::A is a HTML tag (Container). Free Download
Yet Another Mail Manager (YAMM) is a Java email client. Free Download
GtkHTML is a HTML rendering/editing library. Free Download
Latest Software
Popular Software
Favourite Software