Father Chrysostomos > HTML-DOM-0.053 > HTML::DOM::Text

Download:
HTML-DOM-0.053.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Stalled  1
View/Report Bugs
Module Version: 0.053   Source  

NAME ^

HTML::DOM::Text - A Perl class for representing text nodes in an HTML DOM tree

SYNOPSIS ^

  use HTML::DOM;
  $doc = HTML::DOM->new;
  $comment = $doc->createComment("yayayayayayaaya");

  $comment->data;              # 'yayayayayayaaya'
  $comment->length;            #  27
  $comment->substringData(13); # 'ya' 
  # etc.

DESCRIPTION ^

This class implements the Comment interface for HTML::DOM. It inherits from HTML::DOM::CharacterData, which inherits from HTML::DOM::Node.

METHODS ^

HTML::DOM::Comment's Own Methods

$text->nodeName

This returns '#comment'.

$text->nodeType

This returns the constant HTML::DOM::Node::COMMENT_NODE.

$text->starttag

An overridden version of HTML::Element's method, which returns the return value of data surrounded by <!-- -->.

$text->endtag

An overridden version of HTML::Element's method, which returns an empty string.

Inherited Methods

These are inherited from HTML::DOM::CharacterData:

data
length
length16
substringData
substringData16
appendData
insertData
insertData16
deleteData
deleteData16
replaceData
replaceData16
nodeValue

These are inherited from HTML::DOM::Node:

nodeValue
parentNode
childNodes
firstChild
lastChild
previousSibling
nextSibling
attributes
ownerDocument
insertBefore
replaceChild
removeChild
appendChild
hasChildNodes
cloneNode

SEE ALSO ^

HTML::DOM

HTML::DOM::CharacterData

HTML::DOM::Node

syntax highlighting: