Published on WSO2 Oxygen Tank (http://wso2.org)

Recommendation for 'consuming' a Message?

By thelliez
Created 2008-03-17 16:59
Assuming a message like this example:
req_payload_string = <<XML
        <ns1:echoString xmlns:ns1="http://ruby.wsf.wso2.net/samples">
            <text>Hello World!</text>
	</ns1:echoString>
    XML

What would you recommend using on the provider side to get to the <text> element?
Using REXML like the following?
doc = REXML::Document.new req_payload_string
doc.elements.each("*/text") { |element| puts element.text }
Or is there a better way to access the field?
 
Thanks,
Thierry

Source URL:
http://wso2.org/forum/thread/3379