def rest_xml
      doc = REXML::Document.new
      scpt = doc.add_element 'script'

      scpt.add_element('filename').text = @filename
      scpt.add_element('id').text = @id
      scpt.add_element('info').text = @info
      scpt.add_element('name').text = @name
      scpt.add_element('notes').text = @notes
      scpt.add_element('os_requirements').text = JSS.to_s_and_a(@os_requirements)[:stringform]
      scpt.add_element('priority').text = @priority
      add_category_to_xml(doc)

      if @parameters.empty?
        scpt.add_element('parameters').text = nil
      else
        pars = scpt.add_element('parameters')
        PARAMETER_KEYS.each { |p| pars.add_element(p.to_s).text = @parameters[p] }
      end

      scpt.add_element('script_contents_encoded').text = Base64.encode64(@script_contents)

      doc.to_s
    end
def rest_xml
      doc = REXML::Document.new
      scpt = doc.add_element 'script'

      scpt.add_element('filename').text = @filename
      scpt.add_element('id').text = @id
      scpt.add_element('info').text = @info
      scpt.add_element('name').text = @name
      scpt.add_element('notes').text = @notes
      scpt.add_element('os_requirements').text = JSS.to_s_and_a(@os_requirements)[:stringform]
      scpt.add_element('priority').text = @priority
      add_category_to_xml(doc)

      if @parameters.empty?
        scpt.add_element('parameters').text = nil
      else
        pars = scpt.add_element('parameters')
        PARAMETER_KEYS.each { |p| pars.add_element(p.to_s).text = @parameters[p] }
      end

      scpt.add_element('script_contents_encoded').text = Base64.encode64(@script_contents)

      doc.to_s
    end
Return the xml for creating or updating this script in the JSS