comparison lib/IMPL/DOM/XMLReader.pm @ 411:ee36115f6a34 ref20150831

sync
author cin
date Mon, 21 Sep 2015 00:53:10 +0300
parents c6e90e02dd17
children
comparison
equal deleted inserted replaced
410:9335cf010b23 411:ee36115f6a34
1 package IMPL::DOM::XMLReader; 1 package IMPL::DOM::XMLReader;
2 use strict; 2 use strict;
3 use warnings; 3 use warnings;
4 4
5 use parent qw(IMPL::Object IMPL::Object::Autofill);
6
7 use IMPL::Class::Property;
8 use XML::Parser; 5 use XML::Parser;
9 6
10 use IMPL::require { 7 use IMPL::declare {
11 Schema => 'IMPL::DOM::Schema', # IMPL::DOM::Schema references IMPL::DOM::XML::Reader 8 require => {
12 Builder => 'IMPL::DOM::Navigator::Builder', 9 Schema => 'IMPL::DOM::Schema', # IMPL::DOM::Schema references IMPL::DOM::XML::Reader
13 SimpleBuilder => 'IMPL::DOM::Navigator::SimpleBuilder' 10 Builder => 'IMPL::DOM::Navigator::Builder',
11 SimpleBuilder => 'IMPL::DOM::Navigator::SimpleBuilder'
12 },
13 base => [
14 'IMPL::Object' => undef
15 ],
16 props => [
17 Navigator => '*r',
18 SkipWhitespace => '*r',
19 _current => '*rw',
20 _text => '*rw',
21 _textHistory => '*rw'
22 ]
14 }; 23 };
15 24
16 __PACKAGE__->PassThroughArgs; 25 use IMPL::require {
26
27 };
17 28
18 BEGIN { 29 sub CTOR {
19 public _direct property Navigator => prop_get | owner_set; 30 my ($this, %params) = @_;
20 public _direct property SkipWhitespace => prop_get | owner_set; 31
21 private _direct property _current => prop_all; 32 $this->{$Navigator} = $params{Navigator} if $params{Navigator};
22 private _direct property _text => prop_all; 33 $this->{$SkipWhitespace} = $params{SkipWhitespace} if $params{SkipWhitespace};
23 private _direct property _textHistory => prop_all;
24 } 34 }
25 35
26 sub Parse { 36 sub Parse {
27 my ($this,$in) = @_; 37 my ($this,$in) = @_;
28 38