The manakai project

Web::DOM::NodeList

The DOM NodeList object

DESCRIPTION

The Web::DOM::NodeList class implements the DOM NodeList interface.

METHODS

Following methods are available:

$node = $node_list->[$index]
$node = $node_list->item ($index)

Return the node in the list, specified by its index. [DOM] [DOMPERL]

Use of the item method is discouraged as it doesn't support Perl-ish ways to access items, such as negative indexing, while $node_list->[-1] works as intended.

$number = @$node_list
$number = $node_list->length

Return the number of the nodes in the list. [DOM] [DOMPERL]

$arrayref = $node_list->to_a

Return the new static array reference containing the nodes in the node list. [DOMPERL]

($node1, $node2, ...) = $node_list->to_list
($node1, $node2, ...) = @$node_list

Return the list of the nodes contained in the node list. [DOMPERL]

The object supports Perl standard read-only operations for array references, e.g. exists $node_list->[4]. [DOMPERL]

SPECIFICATIONS

DOM

DOM Living Standard <http://dom.spec.whatwg.org/#interface-nodelist>.

DOMPERL

manakai's DOM Perl Binding <http://suika.suikawiki.org/~wakaba/wiki/sw/n/manakai%27s%20DOM%20Perl%20Binding#anchor-86>.

SEE ALSO

Web::DOM::Node, Web::DOM::HTMLCollection.

AUTHOR

Wakaba <wakaba@suikawiki.org>.

LICENSE

Copyright 2012-2013 Wakaba <wakaba@suikawiki.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.