Class: EShipper::EShipperResponse

Inherits:
ActiveResource::Base
  • Object
show all
Defined in:
lib/eshipper/responses/eshipper_response.rb

Direct Known Subclasses

Order, OrderInformationReply, SearchReply

Class Method Summary collapse

Class Method Details

.decode(xml) ⇒ Object



8
9
10
11
12
13
# File 'lib/eshipper/responses/eshipper_response.rb', line 8

def self.decode(xml)
  # Remove raw & which are illegal
  # https://stackoverflow.com/questions/17237334/illegal-character-in-raw-string-rexml-parsing
  xml.gsub!(/&(?!(?:amp|lt|gt|quot|apos);)/, "&")
  format.decode(xml)
end