>> h={:title => "hi & mv288" }
=> {:title=>"hi & mv288"}
>> h.to_xml
=> "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<hash>\n  <title>hi
&amp;amp; mv288</title>\n</hash>\n"
>> Hash.from_xml h.to_xml
=> {"hash"=>{"title"=>"hi & mv288"}}

If you notice line#2 and #4, the &amp; characters in the title value
became & after a series of Hash.to_xml and from_xml method calls.

Is there any way to prevent Hash.from_xml from converting &amp; into
&.

I posted question at so as well.
http://stackoverflow.com/questions/4211068/hash-from-xml-double-escapes-amp

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to