README.md in faraday-xml-0.2.0 vs README.md in faraday-xml-0.2.1

- old
+ new

@@ -42,9 +42,24 @@ # or builder.use Faraday::XML::Response builder.response :xml # decode response bodies from XML end ``` +There is also basic support for first class XML encoding/parsing + +```ruby +require 'faraday' +require 'faraday/xml' +hash = { 'user' => { 'name' => 'Erik Michaels-Ober', 'screen_name' => 'sferik' } } +xml = '<user><name>Erik Michaels-Ober</name><screen_name>sferik</screen_name></user>' + +encoder = Faraday::XML::Encoder.build!(indent: 0) +encoder.encode(hash) == xml + +parser = Faraday::XML::Parser.build! +parser.parse(xml) == hash +``` + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/test` to run the tests.