HTML::Parse - Depreciated |
HTML::Parse - Depreciated
use HTML::Parse; $h = parse_htmlfile("test.html"); print $h->dump; $h = parse_html("<p>Some more <i>italic</i> text", $h); $h->delete;
print parse_htmlfile("index.html")->as_HTML; # tidy up markup in a file
Disclaimer: This module is only provided for backwards compatibility with earlier versions of this library. New code shold use the HTML::Parser and HTML::TreeBuilder modules directly.
The HTML::Parse
module provides functions to parse HTML documents.
There are two functions exported by this module:
parse($html)
and $obj
is assumed to be a subclass of HTML::Parser
. Refer to
the HTML::Parser manpage for more documentation.
The $obj will default to an internally created HTML::TreeBuilder
object configured with strict_comment()
turned on. This class
implements a parser that builds (and is) a HTML syntax tree with
HTML::Element objects as nodes.
The return value from parse_html()
is $obj.
Returns undef
if the file could not be opened, or $obj otherwise.
When a HTML::TreeBuilder
object is created, the following variables
control how parsing takes place:
Implicit elements have the implicit()
attribute set.
warn()
with an apropriate message for syntax errors. Default is
false.
the HTML::Parser manpage, the HTML::TreeBuilder manpage, the HTML::Element manpage
Copyright 1995-1998 Gisle Aas. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Gisle Aas <aas@sn.no>
HTML::Parse - Depreciated |