Module: Sqs::Parser

Defined in:
lib/tootsie/patch/sqs.rb

Instance Method Summary collapse

Instance Method Details

#rexml_document(xml) ⇒ Object



5
6
7
8
9
10
11
12
13
14
# File 'lib/tootsie/patch/sqs.rb', line 5

def rexml_document(xml)
  if xml.respond_to? :force_encoding
    if defined?(REXML::Encoding::UTF_8)
      xml.force_encoding(Encoding::UTF_8)
    else
      xml.force_encoding('utf-8')
    end
  end
  Document.new(xml)
end