On 2 Jul 2009, at 11:23, doug livesey wrote:
> Hi -- I have a custom ActiveResource action that returns the  
> following xml:
>
> "<result>\n  <successes>\n    <1>a082000000HqJzUAAV</1>\n     
> <2>a082000000HqJzsAAF</2>\n    <3>a082000000HqJzVAAV</3>\n  </ 
> successes>\n  <failures>\n  </failures>\n</result>\n"
>
> Is there a quick & easy way to turn this into the following hash?
>
> { "result" { "successes" => { "1" => "a082000000HqJzUAAV", "2" =>  
> "a082000000HqJzsAAF", "3" => "a082000000HqJzVAAV" }, "failures" =>  
> {} }


This might help:

http://xml-mapping.rubyforge.org/

Not used it myself though.

Will.

-- 
Will Jessop
Super Shiny Robot Limited - Professional web design and development

t: 07939 547 962
w: http://supershinyrobot.com/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" 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/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to