HTML::DOM, version 0.016
HTML::DOM is a Perl implementation of the HTML Document Object Model
This is an alpha release. So far, the level-2 core and HTML DOM
interfaces have been implemented, and some of the level-2 event and
style sheet interfaces.
CHANGES IN THIS RELEASE
• The UIEvent, MouseEvent and MutationEvent interfaces have been
added. (Mutation events for attributes and character data modified
are not yet automatically triggered.)
• Events now have an init method that works like initEvent, but takes
named args.
• trigger_event has been extended to allow named args specifying the
event type and which default action to take. It also chooses the
right event class and reasonable defaults for the event name
passed to it.
• default_event_handler_for’s submit_button and reset_button event
types have been removed, and default default event handlers for spe-
cific event types (i.e., default event handlers already in place by
default) have been replaced by another mechanism (not part of the
public API).
• The innerHTML has been added to HTML::DOM and HTML::DOM::Element. It
is currently read-only.
• Triggering a form’s reset event (or calling its reset method, which
in turn triggers the event) now actually resets the form.
Bug fixes — see the Changes file
TO DO
- Finish Level 2 Events support
- Finish Level 2 CSS support
- Finish DOM Level 0 event support (add event properties)
- Finish innerHTML (and outerHTML?)
- Other DOM interfaces (the rest of level 2, and level 3)
- Support callback routines for creating DOM objects for frames.
- HTML 5 stuff
- Write more complete documentation
- Write more tests
INSTALLATION
The easiest way to install this module is to use the CPAN module or
the cpan script:
[sudo] perl -MCPAN -e "install HTML::DOM"
[sudo] cpan HTML::DOM
Or you can use the following:
perl Makefile.PL
make
make test
[sudo] make install
DEPENDENCIES
This module requires perl 5.8.2 or later and the following
Perl modules:
- Scalar::Util 1.14 or later
- Exporter 5.57 or later
- HTML::TreeBuilder and HTML::Element (both part of the HTML::Tree
distribution) (tested with 3.23)
- URI (tested with 1.35)
- HTTP::Headers::Util is required for writing cookies.
- HTML::Form 1.054 is required if any of the methods provided for
WWW::Mechanize compatibility are to be used.
- CSS::DOM 0.04 or later
- HTML::Encoding is required if the parse_file method is to be used.
- constant::lexical
DOCUMENTATION
After installing, you can find documentation for this module with the
perldoc command.
perldoc HTML::DOM
Or try using man (it's faster, in my experience):
man HTML::DOM
COPYRIGHT AND LICENCE
Copyright (C) 2007-8 Father Chrysostomos
This program is free software; you may redistribute it and/or modify
it under the same terms as perl.