Class: WebMock::Util::Parsers::XML

Inherits:
Object
  • Object
show all
Defined in:
lib/webmock/util/parsers/xml.rb

Class Method Summary collapse

Class Method Details

.parse(xml) ⇒ Object



8
9
10
11
12
# File 'lib/webmock/util/parsers/xml.rb', line 8

def self.parse(xml)
  ::Crack::XML.parse(xml)
rescue ::REXML::ParseException => e
  raise ParseError, "Invalid XML string: #{xml}, Error: #{e.inspect}"
end