I have installed cURB library for my rails 2 application and I am able to send multiple xml files to a single url of a web service as a post request. In addition to that I receive an receipt from the web service in an xml file which I need to be parsed by my application and out put the errors that have been created from the submitted file.
Please could some one guide me with a good library and tutorial in capturing the response and parsing the xml document.
All suggestions are appreciated.
Unless you have already doing so, I recommend you use the libxml2 library for processing XML. The libxml2 library is available as a package on every major Linux distribution.
What follows is a standalone example, that works with Rails 2.3.14, showing how to parse results from curb objects using an XML parser. It then demonstrates how to use XPath queries to select elements from the parsed XML document.
Complete documentation for libxml-ruby is available.