aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rexml/parsers/treeparser.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rexml/parsers/treeparser.rb')
-rw-r--r--lib/rexml/parsers/treeparser.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/rexml/parsers/treeparser.rb b/lib/rexml/parsers/treeparser.rb
index 5c3e142ea7..30327d0dfd 100644
--- a/lib/rexml/parsers/treeparser.rb
+++ b/lib/rexml/parsers/treeparser.rb
@@ -30,7 +30,10 @@ module REXML
return
when :start_element
tag_stack.push(event[1])
- el = @build_context = @build_context.add_element( event[1], event[2] )
+ el = @build_context = @build_context.add_element( event[1] )
+ event[2].each do |key, value|
+ el.attributes[key]=Attribute.new(key,value,self)
+ end
when :end_element
tag_stack.pop
@build_context = @build_context.parent