Sha256: fd63fa3f7ed7d4a1c009201b0a4721246bbfa1811e56ca2595d0710f0909939e

Contents?: true

Size: 688 Bytes

Versions: 11

Compression:

Stored size: 688 Bytes

Contents

require 'xml/parser'
require 'rforce/soap_pullable'

module RForce
  class SoapResponseExpat
    include SoapPullable
    include MethodKeys

    def initialize(content)
      @content = content
    end

    def parse
      @current_value = nil
      @stack = []
      @parsed = MethodHash.new
      @done = false
      @namespaces = []

      XML::Parser.new.parse(@content) do |type, name, data|
        case type
        when XML::Parser::START_ELEM then
          tag_start name, data
        when XML::Parser::CDATA then
          text data
        when XML::Parser::END_ELEM then
          tag_end name
        end

        break if @done
      end

      @parsed
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rforce-0.14 lib/rforce/soap_response_expat.rb
rforce-0.13 lib/rforce/soap_response_expat.rb
rforce-0.12 lib/rforce/soap_response_expat.rb
rforce-0.11 lib/rforce/soap_response_expat.rb
rforce-0.10 lib/rforce/soap_response_expat.rb
rforce-0.9 lib/rforce/soap_response_expat.rb
rforce-0.8.1 lib/rforce/soap_response_expat.rb
rforce-0.8 lib/rforce/soap_response_expat.rb
rforce-0.7 lib/rforce/soap_response_expat.rb
rforce-0.6 lib/rforce/soap_response_expat.rb
rforce-0.5.1 lib/rforce/soap_response_expat.rb