HTML::DOM::CharacterData - A base class shared by HTML::DOM::Text and ::Comment
Version 0.058
This class provides those methods that are shared both by comments and text nodes in an HTML DOM tree.
The following DOM attributes are supported:
The textual data that the node contains.
The number of characters in data.
data
A standards-compliant version of length that counts UTF-16 bytes instead of characters.
length
Returns a substring of the data. If $length is omitted, all characters from $offset to the end of the data are returned.
$length
$offset
A UTF-16 version of substringData.
substringData
Appends $str to the node's data.
$str
Inserts $str at the given $offset, which is understood to be the number of Unicode characters from the beginning of the node's data.
Like insertData, but $offset is taken to be the number of UTF-16 (16-bit) bytes.
insertData
Deletes the specified data. If $length is omitted, all characters from $offset to the end of the node's data are deleted.
A UTF-16 version of the above.
This replaces the substring specified by $offset and $length with $str.
HTML::DOM
HTML::DOM::Text
HTML::DOM::Comment
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.