Sha256: dd59cbc43d3db7098d8a2a0d3b7fe80207778be6dc03ea9fa4f1724e32383cec

Contents?: true

Size: 797 Bytes

Versions: 3

Compression:

Stored size: 797 Bytes

Contents

require 'rexml/document'
require 'rexml/xpath'
require 'rforce/soap_pullable'


module RForce
  # Turns an XML response from the server into a Ruby
  # object whose methods correspond to nested XML elements.
  class SoapResponseRexml
    include SoapPullable
    include MethodKeys

    %w(attlistdecl cdata comment doctype doctype_end elementdecl
       entity entitydecl instruction notationdecl xmldecl).each do |unused|
      define_method(unused) {|*args|}
    end

    def initialize(content)
      @content = content
    end
    
    # Parses an XML string into structured data.
    def parse
      @current_value = nil
      @stack = []
      @parsed = {}
      @done = false
      @namespaces = []

      REXML::Document.parse_stream @content, self
      
      @parsed
    end
  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
silent-e-activerecord-activesalesforce-adapter-2.3.8.1 lib/rforce/soap_response_rexml.rb
althor880-activerecord-activesalesforce-adapter-2.3.7 lib/rforce/soap_response_rexml.rb
althor880-activerecord-activesalesforce-adapter-2.3.6 lib/rforce/soap_response_rexml.rb