def parse(xml)
      xml ||= ''
      xml = StringIO.new(xml) unless xml.respond_to?(:read)

      handler = SaxHandler.new(skip_type_casting: skip_type_casting, known_arrays: known_arrays)
      Ox.sax_parse(handler, xml, convert_special: true)
      handler.to_hash
    end
def parse(xml)
      xml ||= ''
      xml = StringIO.new(xml) unless xml.respond_to?(:read)

      handler = SaxHandler.new(skip_type_casting: skip_type_casting, known_arrays: known_arrays)
      Ox.sax_parse(handler, xml, convert_special: true)
      handler.to_hash
    end
Parse the given XML using {SaxHandler} and return a nested Hash.
 @param [String] xml the XML string to be parsed.
 @return [Hash] a Hash corresponding to +xml+.