I have a client that is sending XML for my site to parse. I am typically a PHP guy and understand how to parse it via PHP, but I am not sure how to do the same with Ruby. The client said they are going to post their XML file to my server (i.e. code below)
curl -X POST -H "Content-Type: text/xml" -d "@/path/to/file.xml" my-web-address.com/parser
and then the parser handler page needs to be able to detect that a file was sent to it, and parse it. Does this mean that Ruby simply looks for any POST request? What do I call to get the POST content (XML file) into a variable to mess with it?
I'm using Nokogiri to parse the XML.
doc = Nokogiri::XML(xml)
Appreciate any insight!