Name : perl-HTML-SimpleParse
| |
Version : 0.12
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 16:12:33
|
Group : Development/Libraries/Perl
| Source RPM : perl-HTML-SimpleParse-0.12-lp154.1.1.src.rpm
|
Size : 0.02 MB
| |
Packager : https://www_suse_com/
| |
Summary : Bare-bones HTML parser
|
Description :
This module is a simple HTML parser. It is similar in concept to HTML::Parser, but it differs from HTML::TreeBuilder in a couple of important ways.
First, HTML::TreeBuilder knows which tags can contain other tags, which start tags have corresponding end tags, which tags can exist only in the < HEAD> portion of the document, and so forth. HTML::SimpleParse does not know any of these things. It just finds tags and text in the HTML you give it, it does not care about the specific content of these tags (though it does distiguish between different _types_ of tags, such as comments, starting tags like < b>, ending tags like < /b>, and so on).
Second, HTML::SimpleParse does not create a hierarchical tree of HTML content, but rather a simple linear list. It does not pay any attention to balancing start tags with corresponding end tags, or which pairs of tags are inside other pairs of tags.
Because of these characteristics, you can make a very effective HTML filter by sub-classing HTML::SimpleParse. For example, to remove all comments from HTML:
package NoComment; use HTML::SimpleParse; AATTISA = qw(HTML::SimpleParse); sub output_comment {}
package main; NoComment->new($some_html)->output;
Historically, I started the HTML::SimpleParse project in part because of a misunderstanding about HTML::Parser\'s functionality. Many aspects of these two modules actually overlap. I continue to maintain the HTML::SimpleParse module because people seem to be depending on it, and because beginners sometimes find HTML::SimpleParse to be simpler than HTML::Parser\'s more powerful interface. People also seem to get a fair amount of usage out of the \'parse_args()\' method directly.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-H/15.4/noarch |