comparison Lib/IMPL/DOM/Document.pm @ 152:1e7f03414b65

DOM: schema improvements DOM: saving to XML::Writer feature
author wizard
date Thu, 23 Sep 2010 03:58:43 +0400
parents e6447ad85cb4
children 76515373dac0
comparison
equal deleted inserted replaced
151:e36ffd8c29db 152:1e7f03414b65
27 return $class->new( 27 return $class->new(
28 nodeName => $nodeName, 28 nodeName => $nodeName,
29 document => $this, 29 document => $this,
30 %$refProps 30 %$refProps
31 ); 31 );
32 }
33
34 sub save {
35 my ($this,$writer) = @_;
36
37 $writer->xmlDecl(undef,'yes');
38 $this->SUPER::save($writer);
39 $writer->end();
32 } 40 }
33 41
34 { 42 {
35 my $empty; 43 my $empty;
36 sub Empty() { 44 sub Empty() {
94 ); 102 );
95 } 103 }
96 104
97 =end code 105 =end code
98 106
107 =item C< save($writer) >
108
109 Сохраняет документ в виде XML узла и вызывает C<< $writer->end() >>.
110
111 =over
112
113 =item C<$writer>
114
115 Объект с интерфейсом C<XML::Writer> который будет использован для записи
116 содержимого документа
117
118 =back
119
99 =back 120 =back
100 121
101 =cut 122 =cut