module NexusCli::N3Metadata

def convert_result_to_hash(custom_metadata)

Parses the regular custom metadata xml into a hash containing only the custom metadata.
def convert_result_to_hash(custom_metadata)
  request = {}
  document = REXML::Document.new(custom_metadata)
  REXML::XPath.each(document, "//customMetadataResponse/data/customMetadata[namespace=\"urn:nexus/user#\"]") do |row|
    request[row.elements["key"].text.strip] = row.elements["value"].text.strip
  end
  request
end