Project

General

Profile

Bug #8301 » attributes_to_a.rb

ohai (Ippei Obayashi), 04/20/2013 04:39 PM

 
require 'rexml/document'

doc = REXML::Document.new(<<EOS)
<root xmlns:foo="http://example.org/foo"
xmlns:bar="http://example.org/bar">
<a foo:att='1' bar:att='2' att='&lt;' baz="4"/>
</root>
EOS

a = doc.get_elements("/root/a").first
p a.attributes.to_a
(1-1/2)