def replace_exclusions(xml, exclusions)
      xml.elements.delete('//ExcludedHosts')
      elem = xml.root.add_element('ExcludedHosts')
      exclusions.each do |exclusion|
        elem.add_element(exclusion.as_xml)
      end
    end
def replace_exclusions(xml, exclusions)
      xml.elements.delete('//ExcludedHosts')
      elem = xml.root.add_element('ExcludedHosts')
      exclusions.each do |exclusion|
        elem.add_element(exclusion.as_xml)
      end
    end
Internal method for updating exclusions before saving.