refactor group to_xml to use as_xml like sites