-
Notifications
You must be signed in to change notification settings - Fork 615
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
Savon should output nicely formatted XML to the terminal. #256
Comments
the examples were formatted for readability obviously ;) the problem i see with this feature is speed. |
Ah, that's what I feared ;) Would it be hard to make an option to output only the request in that format? Even that would help.. Someone suggested that I transform the response into a Nokogiri::XML object, like this: puts Nokogiri::XML(response[:foo][:bar]) Could that work? |
i'll think about it, but (to be honest) it's currently not on my "top-priority" list. there's already a method for |
Sure, I can see that, no worries. If I manage to hack together a solution myself I will post it here or at the related question on StackOverflow: |
thank you very much :) |
Implemented in pull request #280 |
Any chance this could be merged? It would really help when getting started using Savon. |
released as v0.9.10. here's an example: Savon.configure do |config|
config.pretty_print_xml = true
end or configured per client: client = Savon.client("http://example.com")
client.config.pretty_print_xml = true |
@jaredhoward and @rubiii you are both awesome! :-) |
Nice! Many thanks, I was waiting for this fix to be released. |
@rubiii It seems client.config has been removed in 2. What is the new syntax for that. |
@sachinprasad The new syntax is pretty similar -- you can find it on the savon site http://savonrb.com/version2 require 'savon'
client = Savon.client do
wsdl "http://example.com?wsdl"
pretty_print_xml true
end |
The nice example over at:
http://savonrb.com/examples.html#german_bank_code_lookup
shows the XML SOAP request debug output formatted like this (on multiple lines):
But currently, Savon doesn't seem to have an option to output the XML nicely formatted like this.
Everything is rather mangled up in a single line, which is harder to read.
I have failed to find an option to specify this. There should be one (imho).
The text was updated successfully, but these errors were encountered: