def add_site_to_xml(xmldoc)
      root = xmldoc.root
      site_elem =
        if self.class::SITE_SUBSET == :top
          root.add_element 'site'
        else
          parent_elem = root.elements[self.class::SITE_SUBSET.to_s]
          parent_elem ||= root.add_element(self.class::SITE_SUBSET.to_s)
          parent_elem.add_element 'site'
        end
      site_elem.add_element('name').text = site_name.to_s
    end
def add_site_to_xml(xmldoc)
      root = xmldoc.root
      site_elem =
        if self.class::SITE_SUBSET == :top
          root.add_element 'site'
        else
          parent_elem = root.elements[self.class::SITE_SUBSET.to_s]
          parent_elem ||= root.add_element(self.class::SITE_SUBSET.to_s)
          parent_elem.add_element 'site'
        end
      site_elem.add_element('name').text = site_name.to_s
    end
parse site
 Add the site to the XML for POSTing or PUTting to the API.

 @param xmldoc[REXML::Document] The in-construction XML document

 @return [void]