DESCRIPTION

This module includes a few functions for searching and manipulating \s-1HTML\s0 trees. Returns a list of elements which are descendents of $node and have class name $class. $class can be a plain string, or a regular expression. If $prefix is supplied it is used as an optional prefix for $class. For example, with $class 'bar' and $prefix 'foo', searchClass will look for all of the following classes: 'bar', 'foobar', 'foo-bar' and 'foo:bar'. Returns the first element which is an ancestor of $node having class name $class. $class can be a plain string, or a regular expression. $skip is the number of levels of ancestor to skip. If $skip is 0, then potentially searchAncestorClass will return $node itself. If $skip is 1, then it will not return $node but could potentially return its parent, and so on. Returns a list of elements which are descendents of $node and have relationship $relationship. $relationship can be a plain string, or a regular expression. As per searchRel, but uses the rev attribute. Returns a descendent of $node with id attribute $id, or undef. Returns the nearest ancestor of $node with tag name $tagname, or undef. Returns a stringified version of a \s-1DOM\s0 element. This is conceptually equivalent to \*(C`$node->textContent\*(C', but follows microformat-specific stringification rules, including value excerption, the abbr pattern and so on. Returns an \s-1XML\s0 serialisation of a \s-1DOM\s0 element. This is conceptually equivalent to \*(C`$node->toStringEC14N\*(C', but hides certain attributes which HTML::Microformats::DocumentContext adds for internal processing.

BUGS

Please report any bugs to <http://rt.cpan.org/>.

RELATED TO HTML::Microformats::Utilities…

HTML::Microformats.

AUTHOR

Toby Inkster <[email protected]>.

COPYRIGHT AND LICENCE

Copyright 2008-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

DISCLAIMER OF WARRANTIES

\s-1THIS\s0 \s-1PACKAGE\s0 \s-1IS\s0 \s-1PROVIDED\s0 \*(L"\s-1AS\s0 \s-1IS\s0\*(R" \s-1AND\s0 \s-1WITHOUT\s0 \s-1ANY\s0 \s-1EXPRESS\s0 \s-1OR\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0, \s-1INCLUDING\s0, \s-1WITHOUT\s0 \s-1LIMITATION\s0, \s-1THE\s0 \s-1IMPLIED\s0 \s-1WARRANTIES\s0 \s-1OF\s0 \s-1MERCHANTIBILITY\s0 \s-1AND\s0 \s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0.