Module: XML::XMLRPC::Parser::Call

Defined in:
lib/xml/libxml/xmlrpc/parser.rb

Overview

Parse a methodCall.

Class Method Summary collapse

Class Method Details

.parse(node) ⇒ Object



148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/xml/libxml/xmlrpc/parser.rb', line 148

def self.parse(node)
    method = node.find('/methodCall/methodName')
    methodname = "unknown"
    if method and method.to_a[0]
        content = method.to_a[0].content
        methodname = content
    end

    values = node.find('/methodCall/params/param/value')

    parsed_params = Parser::ValueParser.parse(values)

    return methodname, parsed_params
end