49
|
1 package IMPL::DOM::Document;
|
|
2 use strict;
|
|
3 use warnings;
|
|
4
|
|
5 use base qw(IMPL::DOM::Node);
|
|
6
|
|
7 __PACKAGE__->PassThroughArgs;
|
|
8
|
|
9 sub document {
|
|
10 return $_[0];
|
|
11 }
|
|
12
|
|
13 sub Create {
|
|
14 my ($this,$nodeName,$class,$refProps) = @_;
|
|
15
|
|
16 $refProps ||= {};
|
|
17
|
|
18 delete $refProps->{nodeName};
|
|
19
|
|
20 return $class->new(
|
|
21 nodeName => $nodeName,
|
|
22 document => $this,
|
|
23 %$refProps
|
|
24 );
|
|
25 }
|
|
26
|
|
27 {
|
|
28 my $empty;
|
|
29 sub Empty() {
|
|
30 return $empty ? $empty : $empty = __PACKAGE__->new(nodeName => 'Empty');
|
|
31 }
|
|
32 }
|
|
33
|
|
34 1;
|
|
35 __END__
|
|
36
|
|
37 =pod
|
|
38
|
|
39 =head1 DESCRIPTION
|
|
40
|
|
41 =head1 METHODS
|
|
42
|
|
43 =over
|
|
44
|
|
45 =item C<<$doc->Create>>
|
|
46
|
|
47 Создает узел определеннго типа с определенным именем и свойствами.
|
|
48
|
|
49 =back
|
|
50
|
|
51 =cut
|