POST XML data
I'm working on a RoR backend for a Flash app. The Flash needs to pass me XML that I need to parse and dump into one or more database tables. But I can't find any info on how to parse XML passed to me, as opposed to parsing XML from somewhere else. How do I process XML posted to my controller action?
Little more info: The xml is coming in the body of the POST. I can't seem to get to that POST body. Any ideas how I can read the POST body?
Use body to get the request body. You can then pass it to an xml-parser. In Ruby, there are quite a few to chose from, but the simplest to use is probably rexml (It requires no external libraries, and it's included with rails)