creates an object.
used internally to initialize the object.
returns the tag name.
takes an attribute name and returns the attribute value or undef if there's no attribute of the name.
returns any text (everything other than tags)
before the tag.
This typically returns white spaces between the tags for an open (start) tag,
and the content of the tag for a close (end) tag,
but don't count on that as HTMLs are not always well-structured.
You can replace the text by passing an extra argument.
takes an attribute name and its value to add to the tag. If there's an attribute of the name, the value will be replaced.
takes an attribute name to remove. You can also pass a regular expression if you remove arbitrary attributes.
takes an attribute name and its value to replace. You can also pass a regular expression if you replace arbitrary attributes.
removes the tag entirely. Note that this only removes a start or end tag, not the pair. So you usually need to add another callback to remove the counterpart.
removes the text before the tag.
removes both the text and the tag.
takes an HTML to insert after the tag. As of this writing, you need to escape the HTML by yourself if necessary.
takes an HTML to insert just before the tag, namely between the skipped text and the tag. As of this writing, you need to escape the HTML by yourself if necessary.
returns an HTML expression of the tag (with the skipped and inserted texts).
Kenichi Ishigaki, <firstname.lastname@example.org>
Yuji Shimada <email@example.com>
Copyright (C) 2009 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.