1HTML::Parse(3)        User Contributed Perl Documentation       HTML::Parse(3)
2
3
4

NAME

6       HTML::Parse - Deprecated, a wrapper around HTML::TreeBuilder
7

SYNOPSIS

9         See the documentation for HTML::TreeBuilder
10

DESCRIPTION

12       Disclaimer: This module is provided only for backwards compatibility
13       with earlier versions of this library.  New code should not use this
14       module, and should really use the HTML::Parser and HTML::TreeBuilder
15       modules directly, instead.
16
17       The "HTML::Parse" module provides functions to parse HTML documents.
18       There are two functions exported by this module:
19
20       parse_html($html) or parse_html($html, $obj)
21           This function is really just a synonym for $obj->parse($html) and
22           $obj is assumed to be a subclass of "HTML::Parser".  Refer to
23           HTML::Parser for more documentation.
24
25           If $obj is not specified, the $obj will default to an internally
26           created new "HTML::TreeBuilder" object configured with
27           strict_comment() turned on.  That class implements a parser that
28           builds (and is) a HTML syntax tree with HTML::Element objects as
29           nodes.
30
31           The return value from parse_html() is $obj.
32
33       parse_htmlfile($file, [$obj])
34           Same as parse_html(), but pulls the HTML to parse, from the named
35           file.
36
37           Returns "undef" if the file could not be opened, or $obj otherwise.
38
39       When a "HTML::TreeBuilder" object is created, the following variables
40       control how parsing takes place:
41
42       $HTML::Parse::IMPLICIT_TAGS
43           Setting this variable to true will instruct the parser to try to
44           deduce implicit elements and implicit end tags.  If this variable
45           is false you get a parse tree that just reflects the text as it
46           stands.  Might be useful for quick & dirty parsing.  Default is
47           true.
48
49           Implicit elements have the implicit() attribute set.
50
51       $HTML::Parse::IGNORE_UNKNOWN
52           This variable contols whether unknow tags should be represented as
53           elements in the parse tree.  Default is true.
54
55       $HTML::Parse::IGNORE_TEXT
56           Do not represent the text content of elements.  This saves space if
57           all you want is to examine the structure of the document.  Default
58           is false.
59
60       $HTML::Parse::WARN
61           Call warn() with an apropriate message for syntax errors.  Default
62           is false.
63

REMEMBER!

65       HTML::TreeBuilder objects should be explicitly destroyed when you're
66       finished with them.  See HTML::TreeBuilder.
67

SEE ALSO

69       HTML::Parser, HTML::TreeBuilder, HTML::Element
70
72       Copyright 1995-1998 Gisle Aas, 1999-2004 Sean M. Burke, 2005 Andy
73       Lester, 2006 Pete Krawczyk.
74
75       This library is free software; you can redistribute it and/or modify it
76       under the same terms as Perl itself.
77
78       This program is distributed in the hope that it will be useful, but
79       without any warranty; without even the implied warranty of
80       merchantability or fitness for a particular purpose.
81

AUTHOR

83       Currently maintained by Pete Krawczyk "<petek@cpan.org>"
84
85       Original authors: Gisle Aas, Sean Burke and Andy Lester.
86
87
88
89perl v5.10.1                      2006-08-07                    HTML::Parse(3)
Impressum