HTML::Object::DOM::Attribute - HTML Object
use HTML::Object::DOM::Attribute; my $this = HTML::Object::DOM::Attribute->new || die( HTML::Object::DOM::Attribute->error, "\n" );
v0.2.0
This module implements a DOM node attribute. It inherits from HTML::Object::Attribute and from HTML::Object::DOM::Node
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ | HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Closing | +-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ | ^ | | v | +-----------------------+ | | HTML::Object::Closing | ------------------------------------------------------------------------+ +-----------------------+
Returns the attribute value as a scalar object
If this attribute has no associated element, this returns an empty list in list context or an empty array reference in scalar context.
Otherwise, this returns an array object of attribute objects for the associated element.
Returns an empty list in list context, or an empty array reference in scalar context.
Returns an empty list in list context, or undef in scalar context.
undef
Returns the attribute name.
Returns the next attribute object for the associated element, or undef if there are no associated element, or if this attribute is the last one of the associated element.
Returns the associated element, if any.
Returns the previous attribute object for the associated element, or undef if there are no associated element, or if this attribute is the first one of the associated element.
Returns the root node by calling getRootNode on this attribute parent.
getRootNode
Returns the attribute value.
Returns true.
Returns false.
Provided with another attribute object, and this returns true if both attribute object have the same value, or false otherwise.
Provided with a node and this returns true if this attribute associated element is the same, or if the associated element is inside the provided element.
Returns the value provided by calling lineage on the associated element and adding it to the lineage, or an empty "array object" if there is no associated element.
lineage
This is just an alias for "getName"
Always returns undef
Returns the qualified name of the attribute. This actually calls "name" in HTML::Object::Attribute
This returns the attribute associated element, if any.
Returns a true boolean object if the attribute value is true, or a false boolean object otherwise.
Returns a new HTML::Object::Number object based on the attribute value.
Returns a string, such as: name="value"
name="value"
Jacques Deguest <jack@deguest.jp>
Mozilla reference
W3C standard on attributes
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.
To install HTML::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Object
CPAN shell
perl -MCPAN -e shell install HTML::Object
For more information on module installation, please visit the detailed CPAN module installation guide.