HTML::DOM, version 0.055 HTML::DOM is a Perl implementation of the HTML Document Object Model This is an alpha release. So far, the level-2 core, HTML and event DOM interfaces have been implemented, and some of the level-2 style sheet interfaces. RECENT CHANGES See the Changes file for the long version. 0.055 ----- Bug fixes: • getElementsByClassName now works correctly when class names contain hyphens, instead of treating hyphens within class attributes as boundaries. This was based on a patch by Sean Dodger (thank you!). • $doc->body used to return a text node in some cases, causing meth- ods like aLink to die. 0.054 ----- New feature: The named node map returned by $element->attributes can now be used as an array or hash reference. This also means that Java- Script code run by WWW::Scripter can do form.attributes[x].value, etc. 0.053 ----- Bug fixes: • An extraneous tag with event attributes now calls the event_attr_handler on the body, not the preceding tag, and actually supplies the value of the attribute, rather than undef (RT #75997). Thanks again to Tomki Camp for the report. • DOMAttrModified events now always have their type and cancellabil- ity set correctly. 0.052 ----- Bug fixes: • An extraneous tag no longer closes currently open tags, turning
into
(RT #75997). Thanks to Tomki Camp for the report. • The weird colour methods of the document (fgColor, etc.) no longer die when there is no body element. TO DO - Finish Level 2 CSS support - outerHTML/innerText? - Other DOM interfaces (the rest of level 2, and level 3) - HTML 5 stuff - Write more complete documentation - Write more tests - Finishing checking for memory leaks (run all tests under Devel::Leak::Object) 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.3 or higher and the following Perl modules: - Scalar::Util 1.14 or later - Exporter 5.57 or later - URI - LWP 1.13 or later - CSS::DOM 0.07 or later - HTML::Tagset 3.02 or later - HTML::Parser 3.46 or later - HTML::Encoding is required if the parse_file method is to be used. - Tie::RefHash::Weak 0.08 or higher, if you are using perl 5.8.x 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-14 Father Chrysostomos This program is free software; you may redistribute it and/or modify it under the same terms as perl.