blob: 81aad84881cc06ade5f0232f33989f0615a21bce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
######################################################################
package XML::DOM::NodeList;
######################################################################
use vars qw ( $EMPTY );
# Empty NodeList
$EMPTY = new XML::DOM::NodeList;
sub new
{
bless [], $_[0];
}
sub item
{
$_[0]->[$_[1]];
}
sub getLength
{
int (@{$_[0]});
}
#------------------------------------------------------------
# Extra method implementations
sub dispose
{
my $self = shift;
for my $kid (@{$self})
{
$kid->dispose;
}
}
sub setOwnerDocument
{
my ($self, $doc) = @_;
for my $kid (@{$self})
{
$kid->setOwnerDocument ($doc);
}
}
1; # package return code
|