HTML::DOM::Text - A Perl class for representing text nodes in an HTML DOM tree
use HTML::DOM; $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' # etc.
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.
splitText
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:
HTML::DOM
HTML::DOM::CharacterData
HTML::DOM::Node
To install HTML::DOM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::DOM
CPAN shell
perl -MCPAN -e shell install HTML::DOM
For more information on module installation, please visit the detailed CPAN module installation guide.