Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#xpath and #xml methods on the Response class #210

Closed
wants to merge 73 commits into from
Closed

#xpath and #xml methods on the Response class #210

wants to merge 73 commits into from

Conversation

mboeh
Copy link
Contributor

@mboeh mboeh commented Jul 12, 2011

I find that I'm frequently doing Nokogiri::XML(response.body) and working with that. Since you're already requiring Nokogiri, it seems like it'd be helpful to apply some sugar here: response.xml is the same as that, and memoizes the document as well. response.xpath(path) is response.xml.xpath(path, namespaces) where +namespaces+ is a hash of all the namespaces used in the document. (I'm having to deal with a SOAP service where every response has something like 10-15 namespaces.)

These are pretty low-level. I'll probably also be adding #xpath_value to automatically do .first.inner_text, #xpath_values to do .map{|ele| ele.inner_text}, etc.

Jim Kingdon and others added 30 commits February 2, 2011 17:27
Write integration test (currently pending) for multiple namespaces.
We don't pay attention to the type of a field yet.
Conflicts are resolved but the parser does not work with types yet.
Down to two failures in parser_spec.
All non-pending tests now passing.
Add support for setting a global soap header
instead of yielding different numbers of objects to any block given
to Savon::Client.new and Savon::Client#request, Savon now evaluates
the block or yields the Savon::Client instance if the block expects
a single argument.
jkingdon and others added 28 commits May 15, 2011 11:02
The bug only showed up in Ruby 1.9 because we had been accidentally
calling [:Save, {}].to_s and hoping to get "Save" (which happens to
work in 1.8).
to believe the namespaces implied by the WSDL, rather than one which
the Savon caller explicitly specified.
please take a look at Nori's CHANGELOG for detailed information
@rubiii
Copy link
Contributor

rubiii commented Jul 24, 2011

thanks! merged into master. adding #xpath_value and #xpath_values might be too specific though.

@rubiii rubiii closed this Jul 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

5 participants