diff Lib/IMPL/DOM/XMLReader.pm @ 152:1e7f03414b65

DOM: schema improvements DOM: saving to XML::Writer feature
author wizard
date Thu, 23 Sep 2010 03:58:43 +0400
parents 7b14e0122b79
children 4267a2ac3d46
line wrap: on
line diff
--- a/Lib/IMPL/DOM/XMLReader.pm	Fri Aug 20 16:33:37 2010 +0400
+++ b/Lib/IMPL/DOM/XMLReader.pm	Thu Sep 23 03:58:43 2010 +0400
@@ -14,6 +14,7 @@
 
 BEGIN {
     public _direct property Navigator => prop_get | owner_set;
+    public _direct property SkipWhitespace => prop_get | owner_set;
     private _direct property _current => prop_all;
     private _direct property _text => prop_all;
     private _direct property _textHistory => prop_all;
@@ -57,7 +58,7 @@
 
 sub _OnEnd {
     my ($this,$element) = @_;
-    $this->{$_current}->nodeValue($this->Navigator->inflateValue( $this->{$_text} ) ) if length $this->{$_text};
+    $this->{$_current}->nodeValue($this->Navigator->inflateValue( $this->{$_text} ) ) if length $this->{$_text} and (not $this->{$SkipWhitespace} or $this->{$_text} =~ /\S/);
     $this->{$_text} = pop @{$this->{$_textHistory}};
     $this->{$_current} = $this->Navigator->Back;
 }