HTML::DOM::Text - A Perl class for representing text nodes in an HTML DOM tree
use HTML::DOM; $doc = HTML::DOM->new; $comment = $doc->createComment("yayayayayayaaya"); $comment->data; # 'yayayayayayaaya' $comment->length; # 27 $comment->substringData(13); # 'ya' # etc.
This class implements the Comment interface for HTML::DOM. It inherits from HTML::DOM::CharacterData, which inherits from HTML::DOM::Node.
This returns '#comment'.
This returns the constant HTML::DOM::Node::COMMENT_NODE.
An overridden version of HTML::Element's method, which returns the return value of data surrounded by <!-- -->.
data
<!-- -->
An overridden version of HTML::Element's method, which returns an empty string.
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.