From the API,
http://api.rubyonrails.org/classes/ActiveRecord/XmlSerialization.html
"Builds an XML document to represent the model. Some configuration is
availble through options, however more complicated cases should use
override ActiveRecord‘s to_xml."
This should get you started.
best.
mike
On Jun 13, 2008, at 9:11 AM, Rick Fiorentino wrote:
>
> Hi All,
>
> I am in the middle of building a web service using the standard:
>
> # Return the appropriate response based on the type
> respond_to do |format|
> format.html { render :layout => ''some layout'' }
> format.xml { render :xml => @data.to_xml }
> end
>
> My question is the following possible...
>
> I''d like to insert some custom XML tags before all object.to_xml
data
> which are returned by the web service. For example:
>
> <result></result> - contains a numeric result code
> <result_msg></result_msg> - contains result string
> followed by the object to XML data
>
> Is this possible?
>
> Also, can you filter out specific fields from the response XML?
>
> Thanks,
> Rick
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---