diff 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
line wrap: on
line diff
--- a/Lib/IMPL/DOM/Document.pm	Fri Aug 20 16:33:37 2010 +0400
+++ b/Lib/IMPL/DOM/Document.pm	Thu Sep 23 03:58:43 2010 +0400
@@ -31,6 +31,14 @@
     );
 }
 
+sub save {
+	my ($this,$writer) = @_;
+	
+	$writer->xmlDecl(undef,'yes');
+	$this->SUPER::save($writer);
+	$writer->end();
+}
+
 {
     my $empty;
     sub Empty() {
@@ -96,6 +104,19 @@
 
 =end code
 
+=item C< save($writer) >
+
+Сохраняет документ в виде XML узла и вызывает C<< $writer->end() >>.
+
+=over
+
+=item C<$writer>
+
+Объект с интерфейсом C<XML::Writer> который будет использован для записи
+содержимого документа
+
+=back
+
 =back
 
 =cut