Displaying 2 results from an estimated 2 matches for "typecast_xml_value".
2006 Jul 31
3
Problem in posting xml content.
...my rails website, I
can see the exception info in the log file. The error message is "can''t
typecast" the element name in my xml document.
The first line in backtrace is:
"c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.3/lib/action_controller/cgi_ext/cgi_methods.rb:111:in`typecast_xml_value''"
Please give me some information on how to settle this problem. Thanks.
--
Posted via http://www.ruby-forum.com/.
2006 Jul 24
0
parsing xml from post
...Anyone know how
to fix this (my code or rails wherever the real problem is) ?
<?xml version="1.0" encoding="UTF-8"?>
<Transaction id="1">
<Authorization>
<Merid>test</Merid>
</Authorization>
</Transaction>
def self.typecast_xml_value(value)
case value
when Hash
if value.has_key?("__content__")
content = translate_xml_entities(value["__content__"])
case value["type"]
when "integer" then content.to_i
when "boolean" then...