diff options
author | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-10 02:01:04 +0000 |
---|---|---|
committer | ser <ser@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-06-10 02:01:04 +0000 |
commit | 3289dfc78b4c5051b0079217a193ce50d5349506 (patch) | |
tree | 564ff1057a5341fa9b28cf03218851f8d0255f4f /lib/rexml/parsers/streamparser.rb | |
parent | f2b75020ba193b6d20788c800fde583ca8e900d5 (diff) | |
download | ruby-3289dfc78b4c5051b0079217a193ce50d5349506.tar.gz |
-
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rexml/parsers/streamparser.rb')
-rw-r--r-- | lib/rexml/parsers/streamparser.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rexml/parsers/streamparser.rb b/lib/rexml/parsers/streamparser.rb index 49bef0d8fa..357cc186e6 100644 --- a/lib/rexml/parsers/streamparser.rb +++ b/lib/rexml/parsers/streamparser.rb @@ -6,6 +6,10 @@ module REXML @parser = BaseParser.new( source ) end + def add_listener( listener ) + @parser.add_listener( listener ) + end + def parse # entity string while true @@ -14,7 +18,10 @@ module REXML when :end_document return when :start_element - @listener.tag_start( event[1], event[2] ) + attrs = event[2].each do |n, v| + event[2][n] = @parser.unnormalize( v ) + end + @listener.tag_start( event[1], attrs ) when :end_element @listener.tag_end( event[1] ) when :text |