HTML::DOM::Text - A Perl class for representing text nodes in an HTML DOM tree
$doc = HTML::DOM->new;
$text_node = $doc->createTextNode('the text goes here, I think');
$text_node->data; # 'the text goes here, I think'
$text_node->length; # 27
$text_node->substringData(22); # 'think'
This class implements the Text interface for HTML::DOM. It inherits from HTML::DOM::CharacterData, which inherits from HTML::DOM::Node.
Splits the node into two separate sibling text nodes at the given offset.
This is just like splitText except that the offset is given in UTF-16, rather than Unicode.
This returns '#text'.
This returns the constant HTML::DOM::Node::TEXT_NODE.
These are inherited from HTML::DOM::CharacterData:
These are inherited from HTML::DOM::Node:
To install HTML::DOM, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.