I have followed much tutorials about Ruby 2.2 and REXML. This is an example of my xml:
<msg user='Karim'><body action='ChkUsername' r='0'><ver v='153' /></body></msg>
And this is what I currently have as code:
xml = "<msg user='Karim'><body action='ChkUsername' r='0'><ver v='153' /></body></msg>"
doc = Document.new xml
puts doc.root.attributes[action]
That won't work. An error pops out. undefined local variable or method 'action' for #{classname} (NameError)