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 strict_com‐
27           ment() turned on.  That class implements a parser that builds (and
28           is) a HTML syntax tree with HTML::Element objects as nodes.
29
30           The return value from parse_html() is $obj.
31
32       parse_htmlfile($file, [$obj])
33           Same as parse_html(), but pulls the HTML to parse, from the named
34           file.
35
36           Returns "undef" if the file could not be opened, or $obj otherwise.
37
38       When a "HTML::TreeBuilder" object is created, the following variables
39       control how parsing takes place:
40
41       $HTML::Parse::IMPLICIT_TAGS
42           Setting this variable to true will instruct the parser to try to
43           deduce implicit elements and implicit end tags.  If this variable
44           is false you get a parse tree that just reflects the text as it
45           stands.  Might be useful for quick & dirty parsing.  Default is
46           true.
47
48           Implicit elements have the implicit() attribute set.
49
50       $HTML::Parse::IGNORE_UNKNOWN
51           This variable contols whether unknow tags should be represented as
52           elements in the parse tree.  Default is true.
53
54       $HTML::Parse::IGNORE_TEXT
55           Do not represent the text content of elements.  This saves space if
56           all you want is to examine the structure of the document.  Default
57           is false.
58
59       $HTML::Parse::WARN
60           Call warn() with an apropriate message for syntax errors.  Default
61           is false.
62

REMEMBER!

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

SEE ALSO

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

AUTHOR

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