comparison 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
comparison
equal deleted inserted replaced
151:e36ffd8c29db 152:1e7f03414b65
12 12
13 __PACKAGE__->PassThroughArgs; 13 __PACKAGE__->PassThroughArgs;
14 14
15 BEGIN { 15 BEGIN {
16 public _direct property Navigator => prop_get | owner_set; 16 public _direct property Navigator => prop_get | owner_set;
17 public _direct property SkipWhitespace => prop_get | owner_set;
17 private _direct property _current => prop_all; 18 private _direct property _current => prop_all;
18 private _direct property _text => prop_all; 19 private _direct property _text => prop_all;
19 private _direct property _textHistory => prop_all; 20 private _direct property _textHistory => prop_all;
20 } 21 }
21 22
55 $this->{$_current} = $this->Navigator->NavigateCreate($element,%attrs); 56 $this->{$_current} = $this->Navigator->NavigateCreate($element,%attrs);
56 } 57 }
57 58
58 sub _OnEnd { 59 sub _OnEnd {
59 my ($this,$element) = @_; 60 my ($this,$element) = @_;
60 $this->{$_current}->nodeValue($this->Navigator->inflateValue( $this->{$_text} ) ) if length $this->{$_text}; 61 $this->{$_current}->nodeValue($this->Navigator->inflateValue( $this->{$_text} ) ) if length $this->{$_text} and (not $this->{$SkipWhitespace} or $this->{$_text} =~ /\S/);
61 $this->{$_text} = pop @{$this->{$_textHistory}}; 62 $this->{$_text} = pop @{$this->{$_textHistory}};
62 $this->{$_current} = $this->Navigator->Back; 63 $this->{$_current} = $this->Navigator->Back;
63 } 64 }
64 65
65 sub _OnChar { 66 sub _OnChar {