Hi
thnkas for the responses, I have tried to prgress this by using REXML,
and I have tried creating an REXL doc using
doc = REXML::Document.new ranking
where ranking is a variable that I have assigned from the paramters
submitted to my controller, the parameters shown in the log as
follows:
Parameters: {“ranking”=>{“asset”=>[{“title”=>“title one”, “id”=>“1”,
“rank”=>“1”},
{“title”=>“title two”, “id”=>“2”, “rank”=>“2”},
{“title”=>"title fourteen ", “id”=>“14”, “rank”=>“3”},
.......
{"title"=>"title xxxxx", "id"=>"3", "rank"=>"12"},
{"title"=>"title yyyyyy", "id"=>"10", "rank"=>"13"}]},
"_method"=>"put", "action"=>"ranking", "path_prefix"=>"/
demo", “controller”=>“assets”}
As a result of the Document.new I get the following error
NameError (undefined local variable or method source' for REXML::SourceFactory:Class): c:/ruby/lib/ruby/1.8/rexml/source.rb:20:in
create_from’
c:/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:130:in stream=' c:/ruby/lib/ruby/1.8/rexml/parsers/baseparser.rb:107:in
initialize’
c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in new' c:/ruby/lib/ruby/1.8/rexml/parsers/treeparser.rb:8:in
initialize’
I have tried various options but can’t seem to get round this. I
assume I am having this problem as REXML does not recoginise the input
to the new constructor as XML.
If anyone can shed any light on this I would much appreciate it.
cheers, G