NAME
HTML::Object::DOM::Comment - HTML Object DOM Comment Class
SYNOPSIS
use HTML::Object::DOM::Comment;
my $this = HTML::Object::DOM::Comment->new( value => $some_comment ) ||
die( HTML::Object::DOM::Comment->error );
VERSION
v0.2.0
DESCRIPTION
The Comment interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view.
Comments are represented in HTML and XML as content between '<!--' and '-->'. In XML, like inside SVG or MathML markup, the character sequence '--' cannot be used within a comment.
It inherits from HTML::Object::Comment and HTML::Object::DOM::CharacterData
INHERITANCE
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------------+ +----------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::CharacterData | --> | HTML::Object::DOM::Comment |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------------+ +----------------------------+
| ^
| |
v |
+-----------------------+ |
| HTML::Object::Comment | -----------------------------------------------------------------------------------------------------------------+
+-----------------------+
PROPERTIES
nodeValue
Sets or gets the text value for the current node.
For document, element or collection, this returns undef and for attribute, text or comment, this returns the object value.
METHODS
getAttributes
Returns an empty list in list context, or an empty array reference in scalar context.
getChildNodes
Returns an empty list in list context, or an empty array reference in scalar context.
getElementById
Returns an empty list in list context, or undef in scalar context.
getFirstChild
Returns an empty list in list context, or undef in scalar context.
getLastChild
Returns an empty list in list context, or undef in scalar context.
getParentNode
Returns the parent node, if any.
getRootNode
Returns the root node
getValue
Returns the text value of this comment, i.e. the text between <!-- and -->
isAttributeNode
Returns false.
isCommentNode
Returns true.
isElementNode
Returns false.
isEqualNode
Provided with another element object, and this returns true if both comment element are the same, or false otherwise.
Returns a boolean value which indicates whether or not two elements are of the same type and all their defining data points match.
Two elements are equal when they have the same type, defining characteristics (this would be their ID, number of children, and so forth), its attributes match, and so on. The specific set of data points that must match varies depending on the types of the elements.
isNamespaceNode
Returns false.
isPINode
Returns false.
isProcessingInstructionNode
Returns false.
isTextNode
Returns false.
nodeValue
This returns or sets the value of the current element.
string_value
Returns the content of the comment as a string.
toString
Returns the content of the comment as a string.
AUTHOR
Jacques Deguest <jack@deguest.jp>
SEE ALSO
COPYRIGHT & LICENSE
Copyright(c) 2021 DEGUEST Pte. Ltd.
All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.