let group_of_source source =
  let xml = XmlParser.parse t_parser source in
  match xml with
  | PCData _ -> failwith "Parse error: not a group"
  | Element (e, atts, subs) ->
      match String.lowercase e with
        s when s = group_tag ->
          let group = Tdl_types.group () in
          group.group_title <-
            get_att ~required: false atts att_title;
          group.group_id <- map_opt
              int_of_string (get_opt_att atts att_id);
          group_of_xmls group subs
      |        _ ->
          failwith "Parse error: not group"