README.rdoc in smacks-apricoteatsgorilla-0.1.1 vs README.rdoc in smacks-apricoteatsgorilla-0.1.2
- old
+ new
@@ -5,12 +5,17 @@
also doesn't follow the BadgerFish convention.
== Install
$ sudo gem sources -a http://gems.github.com
- $ sudo gem install smacks-apricoteatsgorilla hpricot
+ $ sudo gem install smacks-apricoteatsgorilla
+ $ sudo gem install hpricot
+== Dependencies
+
+ Hpricot 0.6.164 (also available for JRuby)
+
== An example
Let's assume you receive the following SOAP response message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
@@ -30,10 +35,11 @@
</soap:Body>
</soap:Envelope>
Just pass in the raw XML string like this:
+ require 'rubygems'
require 'apricoteatsgorilla'
hash = ApricotEatsGorilla.soap_response_to_hash(xml)
And it gets converted into a nice little hash:
@@ -51,5 +57,9 @@
* It assumes a root node named "return", but you can pass in an XPath
expession as the second parameter, to define a different root node.
* All attributes are ignored and won't be included in the hash.
* The value of empty element nodes will be nil.
* Values of "true" or "false" will be converted to boolean objects.
+
+== For more information
+
+Take a look at the tests to see some more examples.