Converting ProjectX parameters to a hash

require 'xparams'

XParams.parse &quot;<params><param var='current_user'>jrobertson</param><param var='page_no'>1</param></params>&quot;
#=> {:current_user=>&quot;jrobertson&quot;, :page_no=>&quot;1&quot;}</pre>

XParams#parse converts an xml parameter list to a hash, as used by ProjectX.

Resources

Tags:
Source:
1210hrs.txt
Published:
29-03-2014 12:10