def get_metadata(type = 'METADATA-SYSTEM', id = '*')
      xml = download_metadata(type, id)

      result = @response_parser.parse_metadata(xml, @format)
      # TODO: fix test to like this
      # result = ResponseDocument.safe_parse(xml).validate!.to_rexml

      if block_given?
        yield result
      else
        result
      end
    end
def get_metadata(type = 'METADATA-SYSTEM', id = '*')
      xml = download_metadata(type, id)

      result = @response_parser.parse_metadata(xml, @format)
      # TODO: fix test to like this
      # result = ResponseDocument.safe_parse(xml).validate!.to_rexml

      if block_given?
        yield result
      else
        result
      end
    end
Requests Metadata from the server. An optional type and id can be specified to request
 subsets of the Metadata. Please see the RETS specification for more details on this.
 The format variable tells the server which format to return the Metadata in. Unless you
 need the raw metadata in a specified format, you really shouldn't specify the format.

 If called with a block, yields the results and returns the value of the block, or
 returns the metadata directly.