Sha256: f1b0bed62bd8b4a3611cf3f6edc0dd5f10fc21cf89bb5b403c1655c76b8cd76f
Contents?: true
Size: 838 Bytes
Versions: 15
Compression:
Stored size: 838 Bytes
Contents
require 'ox' module Ox # This is an alternative parser for the stdlib xmlrpc library. It makes # use of Ox and is based on REXMLStreamParser. To use it set is as the # parser for an XMLRPC client: # # require 'xmlrpc/client' # require 'ox/xmlrpc_adapter' # client = XMLRPC::Client.new2('http://some_server/rpc') # client.set_parser(Ox::StreamParser.new) # class StreamParser < XMLRPC::XMLParser::AbstractStreamParser def initialize @parser_class = OxParser end class OxParser < Ox::Sax include XMLRPC::XMLParser::StreamParserMixin alias :text :character alias :end_element :endElement alias :start_element :startElement def parse(str) Ox.sax_parse(self, StringIO.new(str), :symbolize => false, :convert_special => true) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems