def save(nsc)
      root = REXML::XPath.first(@xml, 'ScanTemplate')
      if root.attributes['id'] == '#NewScanTemplate#'
        response = JSON.parse(AJAX.post(nsc, '/data/scan/templates', xml))
        root.attributes['id'] = response['value']
      else
        response = JSON.parse(AJAX.put(nsc, "/data/scan/templates/#{URI.encode(id)}", xml))
      end
      response['value']
    end
def save(nsc)
      root = REXML::XPath.first(@xml, 'ScanTemplate')
      if root.attributes['id'] == '#NewScanTemplate#'
        response = JSON.parse(AJAX.post(nsc, '/data/scan/templates', xml))
        root.attributes['id'] = response['value']
      else
        response = JSON.parse(AJAX.put(nsc, "/data/scan/templates/#{URI.encode(id)}", xml))
      end
      response['value']
    end
Save this scan template configuration to a Nexpose console.

 @param [Connection] nsc API connection to a Nexpose console.