Displaying 2 results from an estimated 2 matches for "roxml".
Did you mean:
rexml
2009 Jan 05
5
ROXML versus simple to_xml
How they differ?
Does the to_xml method of the classes array/hash/object is based on
ROXML lib?
As I see in http://roxml.rubyforge.org/#quickstart, roxml needs we
define the class (class Book in the guide) before to convert a object
to xml. Moreover, the method to_xml (when not using "include ROXML")
just accepts any existing object, what is much suitable.
I need to compare an...
2009 Feb 03
3
ROXML from_xml not returning an object instance...
...Controller.
When I call Route.from_xml(xmlString) it is not returning an object -
it''s leaving the object (@route) nil, but not erroring. Any ideas?
Here''s some code:
RoutesController:
def create
@route = nil;
if params[:requestXML]
# unserialise from XML using ROXML
@route = Route.from_xml(params[:requestXML]);
else
@route = Route.new(params[:route])
end
respond_to do |format|
#The following line unsurprisingly fails, as @route is nil
if @route.save
flash[:notice] = ''Route was successfully created.'...